Verify the installation

Follow this guide to verify that your multicluster Istio installation is working properly.

Before proceeding, be sure to complete the steps under before you begin as well as choosing and following one of the multicluster installation guides.

In this guide, we will deploy the HelloWorld application V1 to cluster1 and V2 to cluster2. Upon receiving a request, HelloWorld will include its version in its response.

We will also deploy the Sleep container to both clusters. We will use these pods as the source of requests to the HelloWorld service, simulating in-mesh traffic. Finally, after generating traffic, we will observe which cluster received the requests.

Deploy the HelloWorld Service

In order to make the HelloWorld service callable from any cluster, the DNS lookup must succeed in each cluster (see deployment models for details). We will address this by deploying the HelloWorld Service to each cluster in the mesh.

To begin, create the sample namespace in each cluster:

  1. $ kubectl create --context="${CTX_CLUSTER1}" namespace sample
  2. $ kubectl create --context="${CTX_CLUSTER2}" namespace sample

Enable automatic sidecar injection for the sample namespace:

  1. $ kubectl label --context="${CTX_CLUSTER1}" namespace sample \
  2. istio-injection=enabled
  3. $ kubectl label --context="${CTX_CLUSTER2}" namespace sample \
  4. istio-injection=enabled

Create the HelloWorld service in both clusters:

ZipZip

  1. $ kubectl apply --context="${CTX_CLUSTER1}" \
  2. -f @samples/helloworld/helloworld.yaml@ \
  3. -l service=helloworld -n sample
  4. $ kubectl apply --context="${CTX_CLUSTER2}" \
  5. -f @samples/helloworld/helloworld.yaml@ \
  6. -l service=helloworld -n sample

Deploy HelloWorld V1

Deploy the helloworld-v1 application to cluster1:

Zip

  1. $ kubectl apply --context="${CTX_CLUSTER1}" \
  2. -f @samples/helloworld/helloworld.yaml@ \
  3. -l version=v1 -n sample

Confirm the helloworld-v1 pod status:

  1. $ kubectl get pod --context="${CTX_CLUSTER1}" -n sample -l app=helloworld
  2. NAME READY STATUS RESTARTS AGE
  3. helloworld-v1-86f77cd7bd-cpxhv 2/2 Running 0 40s

Wait until the status of helloworld-v1 is Running.

Deploy HelloWorld V2

Deploy the helloworld-v2 application to cluster2:

Zip

  1. $ kubectl apply --context="${CTX_CLUSTER2}" \
  2. -f @samples/helloworld/helloworld.yaml@ \
  3. -l version=v2 -n sample

Confirm the status the helloworld-v2 pod status:

  1. $ kubectl get pod --context="${CTX_CLUSTER2}" -n sample -l app=helloworld
  2. NAME READY STATUS RESTARTS AGE
  3. helloworld-v2-758dd55874-6x4t8 2/2 Running 0 40s

Wait until the status of helloworld-v2 is Running.

Deploy Sleep

Deploy the Sleep application to both clusters:

ZipZip

  1. $ kubectl apply --context="${CTX_CLUSTER1}" \
  2. -f @samples/sleep/sleep.yaml@ -n sample
  3. $ kubectl apply --context="${CTX_CLUSTER2}" \
  4. -f @samples/sleep/sleep.yaml@ -n sample

Confirm the status Sleep pod on cluster1:

  1. $ kubectl get pod --context="${CTX_CLUSTER1}" -n sample -l app=sleep
  2. NAME READY STATUS RESTARTS AGE
  3. sleep-754684654f-n6bzf 2/2 Running 0 5s

Wait until the status of the Sleep pod is Running.

Confirm the status of the Sleep pod on cluster2:

  1. $ kubectl get pod --context="${CTX_CLUSTER2}" -n sample -l app=sleep
  2. NAME READY STATUS RESTARTS AGE
  3. sleep-754684654f-dzl9j 2/2 Running 0 5s

Wait until the status of the Sleep pod is Running.

Verifying Cross-Cluster Traffic

To verify that cross-cluster load balancing works as expected, call the HelloWorld service several times using the Sleep pod. To ensure load balancing is working properly, call the HelloWorld service from all clusters in your deployment.

Send one request from the Sleep pod on cluster1 to the HelloWorld service:

  1. $ kubectl exec --context="${CTX_CLUSTER1}" -n sample -c sleep \
  2. "$(kubectl get pod --context="${CTX_CLUSTER1}" -n sample -l \
  3. app=sleep -o jsonpath='{.items[0].metadata.name}')" \
  4. -- curl -sS helloworld.sample:5000/hello

Repeat this request several times and verify that the HelloWorld version should toggle between v1 and v2:

  1. Hello version: v2, instance: helloworld-v2-758dd55874-6x4t8
  2. Hello version: v1, instance: helloworld-v1-86f77cd7bd-cpxhv
  3. ...

Now repeat this process from the Sleep pod on cluster2:

  1. $ kubectl exec --context="${CTX_CLUSTER2}" -n sample -c sleep \
  2. "$(kubectl get pod --context="${CTX_CLUSTER2}" -n sample -l \
  3. app=sleep -o jsonpath='{.items[0].metadata.name}')" \
  4. -- curl -sS helloworld.sample:5000/hello

Repeat this request several times and verify that the HelloWorld version should toggle between v1 and v2:

  1. Hello version: v2, instance: helloworld-v2-758dd55874-6x4t8
  2. Hello version: v1, instance: helloworld-v1-86f77cd7bd-cpxhv
  3. ...

Congratulations! You successfully installed and verified Istio on multiple clusters!

Next Steps

Check out the locality load balancing tasks to learn how to control the traffic across a multicluster mesh.

See also

Before you begin

Initial steps before installing Istio on multiple clusters.

Before you begin

Initial steps before configuring locality load balancing.

Install Multi-Primary

Install an Istio mesh across multiple primary clusters.

Install Multi-Primary on different networks

Install an Istio mesh across multiple primary clusters on different networks.

Install Primary-Remote

Install an Istio mesh across primary and remote clusters.

Install Primary-Remote on different networks

Install an Istio mesh across primary and remote clusters on different networks.