This guide explains how to install the Online Boutique sample application to demonstrate Anthos Service Mesh.
Prerequisites
This guide assumes that you have:
- A Google Cloud project.
- A Cloud Billing account.
- Anthos Service Mesh deployed on a cluster.
- Set up your environment.
Downloading and deploying the sample
Download the sample using
kpt
:kpt pkg get \ https://github.com/GoogleCloudPlatform/microservices-demo.git/release \ online-boutique
Create a namespace for the application:
kubectl create namespace demo
Enable automatic sidecar injection (auto-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 looks similar to the following:
NAME READY STATUS RESTARTS AGE LABELS istiod-asm-186-8-5788d57586-bljj4 1/1 Running 0 23h app=istiod,istio.io/rev=asm-186-8,istio=istiod,pod-template-hash=5788d57586 istiod-asm-186-8-5788d57586-vsklm 1/1 Running 1 23h app=istiod,istio.io/rev=asm-186-8,istio=istiod,pod-template-hash=5788d57586
In the output, under the
LABELS
column, note the value of theistiod
revision label, which follows the prefixistio.io/rev=
. In this example, the value isasm-186-8
.Apply the revision label to the namespace. In the following command, REVISION is the value of the
istiod
revision label that you noted in the previous step.kubectl label namespace demo istio-injection- istio.io/rev=REVISION --overwrite
You can ignore the message
"istio-injection not found"
in the output. That means that the namespace didn't previously have theistio-injection
label, which you should expect in new installations of Anthos Service Mesh or new deployments. Because auto-injection fails if a namespace has both theistio-injection
and the revision label, allkubectl label
commands in the Anthos Service Mesh documentation include removing theistio-injection
label.Deploy the sample to the cluster:
kubectl apply -n demo -f online-boutique
Find the external IP address of your application:
kubectl get service frontend-external -n demo
Visit the application on your browser to confirm installation:
http://EXTERNAL_IP/
For GKE, 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