Deploying the Online Boutique sample application on Anthos Service Mesh

This guide explains how to install the Online Boutique sample application to demonstrate Anthos Service Mesh.

Prerequisites

This guide assumes that you have:

Installing a sample using kpt

Optionally, you can use kpt to install the Online Boutique sample into the cluster.

  1. Download the sample:

    kpt pkg get \
      https://github.com/GoogleCloudPlatform/microservices-demo.git/release \
      hipster-demo
  2. Create a namespace for the application:

    kubectl create namespace demo
  3. Enable automatic sidecar injection. Use the following command to locate the label on the istiod service, which contains the revision label value to use in later steps.

    kubectl -n istio-system get pods -l app=istiod --show-labels

    The output lookz similar to the following:

    NAME                                READY   STATUS    RESTARTS   AGE   LABELS
    istiod-asm-173-3-5788d57586-bljj4   1/1     Running   0          23h   app=istiod,istio.io/rev=asm-173-3,istio=istiod,pod-template-hash=5788d57586
    istiod-asm-173-3-5788d57586-vsklm   1/1     Running   1          23h   app=istiod,istio.io/rev=asm-173-3,istio=istiod,pod-template-hash=5788d57586
    

    In the output, under the LABELS column, note the value of the istiod revision label, which follows the prefix istio.io/rev=. In this example, the value is asm-173-3.

  4. Apply the revision label to the namespaces. In the following command, NAMESPACE is the name of the namespace where you want sidecar injection to occur, and REVISION is the value of the istiod revision label that you noted in the previous step.

    kubectl label namespace NAMESPACE istio-injection- istio.io/rev=REVISION --overwrite
    
  5. Deploy the sample to the cluster:

    kubectl apply -n demo -f hipster-demo
  6. Find the external IP address of your application:

    kubectl get service frontend-external -n demo
  7. Visit the application on your browser to confirm installation:

    http://EXTERNAL_IP/

    Now that you have a sample running, you can explore the Anthos Service Mesh observability features in the Google Cloud console. Note that it can take up to 10 minutes for the topology graph to display the services in your mesh.

When you're finished exploring, remove the Online Boutique sample:

kubectl delete namespaces demo