Chapter 6. Creating the backend service and making it available on the service network

The backend service runs in the east namespace and is not available on the service network by default. You use the skupper command to expose the service to all namespaces on the service network. The backend app is a simple Python application that passes a message to the frontend application.

Procedure

  1. Deploy the backend service in the east terminal session:

    $ kubectl create deployment hello-world-backend --image quay.io/skupper/hello-world-backend
  2. Expose the backend service on the service network from the east terminal session:

    $ skupper expose deployment hello-world-backend --port 8080 --protocol tcp
  3. Check the site status from the west terminal session:

    $ skupper status

    The output should be similar to the following:

    Skupper is enabled for namespace "west" in interior mode. It is connected to 1 other site. It has 1 exposed service.

    The service is exposed from the east namespace.

  4. Check the frontend route in the west terminal session:

    1. Get the route details:

      $  oc get routes

      The output should be similar to the following:

      NAME                   HOST/PORT
      hello-world-frontend   <frontend-url>
    2. Navigate to the <frontend-url> value in your browser, you see a message similar to the following:

      Hi, <name>. I am Mathematical Machine (backend-77f8f45fc8-mnrdp).

      If you click Say hello again, a different backend process responds showing how Application Interconnect balances the requests.

This shows how the frontend calls the backend service over the service network from a different OpenShift cluster.