Istio - A Robust, Extensible Service Mesh for K8s

Published Feb 04 2022 05:03 AM 1,598 Views
Microsoft

What is Service Mesh?

Service Mesh provides managing capabilities for the micro-services hosted in the Kubernetes cluster uniformly and decouples them from the Applications (Microservices) layer.

 

This makes it a great tool for Infrastructure architects as well as Developer architects easily Manage, Observe and Secure the cluster.

 

service-mesh.png

 

Features

  • Observability - Monitor applications hosted inside the cluster

  • Traffic Splitting - Split Ingress Traffic to different versions of an API. Helps  to perform Blue/Green Deployment, A/B Testing, Fault Injection

  • Distributed Tracing - Trace/Compare Service to Service calls with visualisation

  • Circuit Breaking - Limit impact of failures due to uncertainty in Network and make services resilient

  • Mirroring - Allows copying traffic directed to one Service to another Service without affecting the primary traffic anyway. This is also called Shadowing

Considerations

  • Complexity - More complex for simple requirements

  • Resource Overhead - Additional components needs additional resources - CPU, Memory

  • Additional Latency - Proxies, Policy checks adds latency; so might be a challenge for highly latency sensitive applications

 

Istio Service Mesh

A rich Service Mesh tool designed to provide deep insights of applications being deployed inside the K8s cluster, details of the cluster infrastructure and ability to extend by allowing connection to another K8s cluster or other external services.

 

Istio comes with its own visualisation through kiali dashboard

istio-metrics-graph.png

 

Istio Components

istio-component.png

 

Gateway
  • Defines a LoadBalancer at the edge of the Service Mesh receiving incoming or outgoing connections
  • Single Gateway can contain multiple hosts

  • Scoped to a Namespace

Virtual Service
  • Defines the traffic routing rules for a host
  • Single Virtual Service can be mapped with multiple Gateways

  • Single Virtual Service can contain multiple hosts

  • Scoped to a Namespace

Destination Rule
  • Defines Policies to traffic post Routing

  • LoadBalancing, Connection Pool, Outlier

  • Scoped to a Namespace

Service Entry
  • Enables services within the mesh to connect to services which are not registered with the mesh

  • Destination service endpoints can be External to mesh or even outside the cluster
  • Enables the most important concept called Shadowing or Mirroring

 

Let us now delve into this by deploying Istio on an existing AKS cluster. This article would assume that the reader already has created and AKS cluster of any form and is able to access the cluster

 

Plan

  • Prepare two AKS clusters - Primary and Secondary
  • Download Istio command line - istioctl
  • Deploy Istio on both the clusters
  • Deploy multiple applications onto the Primary cluster
  • Check different Service Mesh features on the Primary cluster
  • Deploy specific version of one application (HelloWorld) onto Secondary cluster. Implement Service Mirroring to send live traffic from Primary cluster to Secondary cluster
  • Source Code

 

Set CLI Variables

 

tenantId=""
subscriptionId=""
location="eastus"
clusterName="primary-mesh-cluster"
aksResourceGroup="primary-workshop-rg"
acrName="srvmeshacr"
baseFolderPath=""
primaryResourceGroup=$aksResourceGroup
primaryClusterName=$clusterName
secondaryResourceGroup="secondary-workshop-rg"
secondaryClusterName="secondary-mesh-cluster"
primaryAcrName=$acrName
istioPath="$baseFolderPath/Istio"

 

 

 

Login to Azure

 

#Login to Azure
az login --tenant $tenantId

#Check Selected Subscription
az account show

#Set appropriate Subscription, if needed
#az account set -s $subscriptionId

 

 

 

Configure Primary Cluster

 

#Set Env Variable for Primary Cluster
#This helps to switch context easily between multiple clusters
export CTX_CLUSTER1=primary

#Connect to Public AKS Cluster with Primary Context
az aks get-credentials -g $aksResourceGroup -n $clusterName --context $CTX_CLUSTER1

#Additional helpful commands
#Switch context between multiple clusters
kubectl config use-context <context>

 

 

 

Download Istio

 

#Download Istio binary
curl -L https://istio.io/downloadIstio | sh -

#Download specific version of Istio viz. 1.11.3
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.11.3 TARGET_ARCH=x86_64 sh -

#The istioctl client binary in the bin/ directory
#Add the istioctl client to your path (Linux or macOS):
export PATH=$PWD/bin:$PATH

 

 

 

Check Cluster Health

 

kubectl get no --context=$CTX_CLUSTER1
kubectl get ns --context=$CTX_CLUSTER1

 

 

 

Create Namespaces

 

#Create namespaces for Istio
kubectl create namespace istio-system --context $CTX_CLUSTER1
kubectl create namespace primary --context $CTX_CLUSTER1

 

 

 

Install Istio CLI

 

#Install Istio CLI
#Select Default Istio Profile settings
#Ingress Gateway with Public IP Address
istioctl install --context=$CTX_CLUSTER1 --set profile=default -y

#Install Istio with custom configurations
#Ingress Gateway with Privae IP Address
#Another Publicly exposed LoadBalancer Service(L7) would be needed to access this Private IP
istioctl install --context=$CTX_CLUSTER1 -f $istioPath/Components/values-primary.yaml -y

#Following link describes - how to configure Application Gateway with AKS cluster
#This need to be used if Ingress Gateway is having Private IP
https://docs.microsoft.com/en-us/azure/application-gateway/configuration-http-settings 

 

 

 

 

Configure Istio in Primary Cluster

Inject Istio into Namespaces

 

#Inject Istio into primary namespace
#Ensures sidecar container to be added for every deployment in this namespace
kubectl label namespace primary istio-injection=enabled --context=$CTX_CLUSTER1

#Disable sidecar injection from primary namespace
#kubectl label namespace primary istio-injection=disabled --context=$CTX_CLUSTER1

 

 

 

Install Addons

 

#Install Istio Addons
#This primarily installs all dependencies for observability by Istio viz. Grafana, Kiali dashboard etc.
kubectl apply -f $istioPath/Components/samples/addons --context=$CTX_CLUSTER1

#Check rollout status of the Kiali deployment - usually takes sometime
kubectl rollout status deployment/kiali -n istio-system

#Launch Kiali as background process
istioctl dashboard kiali&

#Might need to Press CTRL+C to allow the job to continue in teh background
#Bring job to foreground - fg [<job-number>]

#Check Deployments within istio-system
#Istio Ingress gateway with public or private IP
kubectl get svc -n istio-system

 

 

 

Deploy BookInfo App

 

#Install BookInfo app onto the cluster
kubectl apply -f $istioPath/Examples/BookInfo/bookinfo.yaml -n primary

#Check Deployed Components
kubectl get svc -n primary --context=$CTX_CLUSTER1
kubectl get pods -n primary --context=$CTX_CLUSTER1

#Quick check to test BookInfo app
podName=$(kubectl get pod -l app=ratings -n primary -o jsonpath='{.items[0].metadata.name}')
kubectl exec $podName -n primary -c ratings -- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>"

 

 

 

Expose Microservices thru an Ingress Gateway

 

#Need a Gateway to expose the service outside
#Check Routing definitions
#Replace <dns-name>
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Get GATEWAY_URL
kubectl get svc istio-ingressgateway -n istio-system
export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}')

#Call services using GATEWAY_URL
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
echo "$GATEWAY_URL"

#Try the follwoing URL in the Browser or do a cUrl
curl http://$GATEWAY_URL/product

 

 

 

Expose Kiali dashboard service through a Gateway

 

#Need a Gateway to expose the Kiali service outside
#Check Routing definitions
#Replace <dns-name>
kubectl apply -f $istioPath/Examples/Networking/kiali-gateway.yaml -n istio-system --context=$CTX_CLUSTER1

#Launch Kiali in the browser
http://$INGRESS_HOST:$INGRESS_PORT/

#If used with Applicagtion Gateway then use appropriate Host header in Http Settings

 

 

 

 

Observability

istio-metrics-inbound.pngistio-metrics-oob.png

 

 

Traffic Splitting

istio-trafficplit.png

 

#Traffic Shifting
kubectl apply -f $istioPath/Examples/HelloWorld/helloworld-app.yaml -n primary --context=$CTX_CLUSTER1
kubectl get po -n primary --context=$CTX_CLUSTER1

#Check Routing definitions
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Destination Rule
kubectl apply -f $istioPath/Examples/Networking/helloworld-destination-rule.yaml -n primary --context=$CTX_CLUSTER1

kubectl apply -f $istioPath/Examples/HelloWorld/helloworld-app-v2.yaml -n primary --context=$CTX_CLUSTER1
kubectl get po -n primary --context=$CTX_CLUSTER1

#Check Routing behaviour
#UNCOMMENT: Test Traffic Shifting
#Update Primary Gateway Routes - Change Traffic weight
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Destination Rule
kubectl apply -f $istioPath/Examples/Networking/helloworld-destination-rule.yaml -n primary --context=$CTX_CLUSTER1

#Check Routing behaviour again

 

 

 

 

Blue/Green

istio-trafficplit-bluegreen.png

 

#Blue/Green
#Deploy PodInfo Blue
kubectl apply -f $istioPath/Examples/BlueGreen/podinfo-blue.yaml -n primary --context=$CTX_CLUSTER1

#Check Routing definitions
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Destination Rule
kubectl apply -f $istioPath/Examples/Networking/podinfo-destination-rule.yaml -n primary --context=$CTX_CLUSTER1

#Deploy PodInfo green
kubectl apply -f $istioPath/Examples/BlueGreen/podinfo-green.yaml -n primary --context=$CTX_CLUSTER1

#Check Routing behaviour
#UNCOMMENT: Test Blue/Green
#Update Primary Gateway Routes - Change Traffic weight
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Destination Rule
kubectl apply -f $istioPath/Examples/Networking/podinfo-destination-rule.yaml -n primary --context=$CTX_CLUSTER1

#Check Routing behaviour again

 

 

 

 

 

Service Mirroring

k8s-mirroring-cross.png

 

Configure Secondary Cluster

 

#Service Mirroring or Shadowing
#Create Secondary Cluster - CLI or Portal
export CTX_CLUSTER2=secondary

#Connect to Public AKS Cluster with Primary Context
az aks get-credentials -g $primaryResourceGroup -n $secondaryClusterName --context $CTX_CLUSTER2

kubectl config use-context $CTX_CLUSTER2

#Check Cluster Health - Secondary
kubectl get no --context=$CTX_CLUSTER2
kubectl get ns --context=$CTX_CLUSTER2
kubectl create namespace istio-system --context $CTX_CLUSTER2
kubectl create namespace secondary --context $CTX_CLUSTER2

#Install Istio CLI
#Select Default Istio Profile settings
#Ingress Gateway with Public IP Address
istioctl install --context=$CTX_CLUSTER2 --set profile=default -y

#Install Istio with custom configurations
#Ingress Gateway with Privae IP Address
#Another Publicly exposed LoadBalancer Service(L7) would be needed to access this Private IP
istioctl install --context=$CTX_CLUSTER2 -f $istioPath/Components/values-secondary.yaml -y

#Inject Istio into Secondary namespace of the cluster 
#This ensures sidecar container to be added for every deployment in this namespace
kubectl label namespace secondary istio-injection=enabled --context=$CTX_CLUSTER2

#Install Istio Addons
#This primarily installs all dependencies for observability by Istio viz. Grafana, Kiali dashboard etc.
kubectl apply -f $istioPath/Components/samples/addons --context=$CTX_CLUSTER2

kubectl get svc istio-ingressgateway -n istio-system
export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}')

export GATEWAY_URL2=$INGRESS_HOST:$INGRESS_PORT
echo "$GATEWAY_URL2"

kubectl apply -f $istioPath/Examples/HelloWorld/helloworld-app-v2.yaml -n secondary --context=$CTX_CLUSTER2
kubectl get po -n secondary --context=$CTX_CLUSTER2

#Need a Gateway to expose the service outside
#Check Routing definitions
#Replace <dns-name>
kubectl apply -f $istioPath/Examples/Networking/secondary-gateway.yaml -n secondary --context=$CTX_CLUSTER2

#Destination Rule
kubectl apply -f $istioPath/Examples/Networking/helloworld-v2-destination-rule.yaml -n secondary --context=$CTX_CLUSTER2

kubectl get svc -n secondary --context=$CTX_CLUSTER2
kubectl describe svc -n secondary --context=$CTX_CLUSTER2
kubectl get svc -A --context=$CTX_CLUSTER2

 

 

 

 

Configure Primary to Mirror services

 

#Switch to the Primary Cluster
kubectl config use-context $CTX_CLUSTER1

#Check Routing definitions
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Deploy components so that Mirroring can work
#Replace <dns-name>
kubectl apply -f $istioPath/Examples/Networking/primary-serviceentry.yaml -n primary --context=$CTX_CLUSTER1

#Destination Rule
#Replace <dns-name>
kubectl apply -f $istioPath/Examples/Networking/helloworld-destination-rule.yaml -n primary --context=$CTX_CLUSTER1

kubectl get svc -n primary --context=$CTX_CLUSTER1
kubectl describe svc -n primary --context=$CTX_CLUSTER1
kubectl get svc -A --context=$CTX_CLUSTER1

#Call helloworld-v1
#Observe that all calls being replicated to helloworld-v2 of secondary cluster

 

 

 

 

 

Circuit Breaker

Destination Rule with Circuit Breaker configurations

 

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: httpbin
spec:
  host: httpbin
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 1
      http:
        http1MaxPendingRequests: 1
        maxRequestsPerConnection: 1
    outlierDetection:
      consecutive5xxErrors: 1
      interval: 1s
      baseEjectionTime: 3m
      maxEjectionPercent: 100
EOF

 

 

 

#Circuit Breaker
#Deploy HttpBin App
kubectl apply -f $istioPath/Examples/HttpBin/httpbin.yaml -n primary --context=$CTX_CLUSTER1
kubectl apply -f $istioPath/Examples/Networking/httpbin-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Deploy HttpBin Destination Rule
kubectl apply -f $istioPath/Examples/Networking/httpbin-destination-rule.yaml -n primary --context=$CTX_CLUSTER1

#Check Routing behaviour
#UNCOMMENT: Test Circuit Breaking
kubectl apply -f $istioPath/Examples/Networking/primary-gateway.yaml -n primary --context=$CTX_CLUSTER1

#Generate Load - e.g. JMeter or Fortio or any other Laod Testing client

#Deploy Fortio client
kubectl apply -f $istioPath/Examples/HttpBin/sample-client/fortio-deploy.yaml -n primary --context=$CTX_CLUSTER1

#Make calls from Fortio client
export FORTIO_POD=$(kubectl get pods -l app=fortio -o 'jsonpath={.items[0].metadata.name}')
kubectl exec "$FORTIO_POD" -c fortio -- /usr/bin/fortio curl -quiet http://httpbin:8000/get

#Check Routing behaviour
#Observer many calls being failed and circuit is broken and joined automatically
#Change parameters in the $istioPath/Examples/Networking/httpbin-destination-rule.yaml file
#Play around and see the chnage in the behaviour

 

 

istio-circuit-break-2.png

 

 

Distributed Tracing

istio-metrics-trace1.pngistio-metrics-trace2.png

 

 

CleanUP

 

#Cleanup
#Uninstall Istio setup - primary cluster
istioctl x uninstall --set profile=default --purge --context=$CTX_CLUSTER1
kubectl delete namespace istio-system --context=$CTX_CLUSTER1
  
#Uninstall Istio setup - secondary cluster
istioctl x uninstall --set profile=default --purge --context=$CTX_CLUSTER2
kubectl delete namespace istio-system --context=$CTX_CLUSTER2

 

 

 

 

 

 

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-3112403%22%20slang%3D%22en-US%22%3EIstio%20-%20A%20Robust%2C%20Extensible%20Service%20Mesh%20for%20K8s%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3112403%22%20slang%3D%22en-US%22%3E%3CH3%20id%3D%22toc-hId--1458517347%22%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1437423431%22%20id%3D%22toc-hId--1437303982%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EWhat%20is%20Service%20Mesh%3F%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EService%20Mesh%20provides%20managing%20capabilities%20for%20the%20micro-services%20hosted%20in%20the%20Kubernetes%20cluster%20uniformly%20and%20decouples%20them%20from%20the%20Applications%20(%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EMicroservices%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E)%20layer.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EThis%20makes%20it%20a%20great%20tool%20for%20Infrastructure%20architects%20as%20well%20as%20Developer%20architects%20easily%20Manage%2C%20Observe%20and%20Secure%20the%20cluster.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22service-mesh.png%22%20style%3D%22width%3A%20929px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345098iD7FDC9D3D1AAFFB8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22service-mesh.png%22%20alt%3D%22service-mesh.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--767955873%22%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--746861957%22%20id%3D%22toc-hId--746742508%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EFeatures%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EObservability%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20Monitor%20applications%20hosted%20inside%20the%20cluster%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETraffic%20Splitting%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20Split%20Ingress%20Traffic%20to%20different%20versions%20of%20an%20API.%20Helps%26nbsp%3B%20to%20perform%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EBlue%2FGreen%20Deployment%2C%20A%2FB%20Testing%2C%20Fault%20Injection%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDistributed%20Tracing%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20Trace%2FCompare%20Service%20to%20Service%20calls%20with%20visualisation%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ECircuit%20Breaking%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20Limit%20impact%20of%20failures%20due%20to%20uncertainty%20in%20Network%20and%20make%20services%20resilient%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSTRONG%3EMirroring%3C%2FSTRONG%3E%20-%20Allows%20copying%20traffic%20directed%20to%20one%20Service%20to%20another%20Service%20without%20affecting%20the%20primary%20traffic%20anyway.%20This%20is%20also%20called%20%3CEM%3E%3CSTRONG%3EShadowing%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH4%20id%3D%22toc-hId-1719556960%22%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1740650876%22%20id%3D%22toc-hId-1740770325%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EConsiderations%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EComplexity%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20More%20complex%20for%20simple%20requirements%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EResource%20Overhead%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20Additional%20components%20needs%20additional%20resources%20-%20CPU%2C%20Memory%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAdditional%20Latency%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20Proxies%2C%20Policy%20checks%20adds%20latency%3B%20so%20might%20be%20a%20challenge%20for%20highly%20latency%20sensitive%20applications%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--66803587%22%20id%3D%22toc-hId--66684138%22%3E%3CA%20href%3D%22https%3A%2F%2Fistio.io%2Flatest%2Fabout%2Fservice-mesh%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EIstio%20Service%20Mesh%3C%2FSPAN%3E%3C%2FA%3E%3C%2FH4%3E%0A%3CP%3EA%20rich%20Service%20Mesh%20tool%20designed%20to%20provide%20deep%20insights%20of%20applications%20being%20deployed%20inside%20the%20K8s%20cluster%2C%20details%20of%20the%20cluster%20infrastructure%20and%20ability%20to%20extend%20by%20allowing%20connection%20to%20another%20K8s%20cluster%20or%20other%20external%20services.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3EIstio%20comes%20with%20its%20own%20visualisation%20through%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fkiali.io%2Fdocs%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ekiali%3C%2FA%3E%26nbsp%3Bdashboard%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-metrics-graph.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345135i915C05CFE884E46A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-metrics-graph.png%22%20alt%3D%22istio-metrics-graph.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1874258050%22%20id%3D%22toc-hId--1874138601%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EIstio%20Components%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-component.png%22%20style%3D%22width%3A%20948px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345211i0CF03B928107D3E9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-component.png%22%20alt%3D%22istio-component.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH5%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1183696576%22%20id%3D%22toc-hId--1183577127%22%3E%3CA%20href%3D%22https%3A%2F%2Fistio.io%2Flatest%2Fdocs%2Freference%2Fconfig%2Fnetworking%2Fgateway%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EGateway%3C%2FSPAN%3E%3C%2FA%3E%3C%2FH5%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDefines%20a%20LoadBalancer%20at%20the%20edge%20of%20the%20Service%20Mesh%26nbsp%3B%3CSPAN%3Ereceiving%20incoming%20or%20outgoing%20connections%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESingle%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EGateway%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20contain%20multiple%20hosts%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EScoped%20to%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3ENamespace%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH5%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1303816257%22%20id%3D%22toc-hId-1303935706%22%3E%3CA%20href%3D%22https%3A%2F%2Fistio.io%2Flatest%2Fdocs%2Freference%2Fconfig%2Fnetworking%2Fvirtual-service%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EVirtual%20Service%3C%2FSPAN%3E%3C%2FA%3E%3C%2FH5%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDefines%20the%26nbsp%3B%3CSPAN%3Etraffic%20routing%20rules%20for%20a%20host%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESingle%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EVirtual%20Service%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20be%20mapped%20with%20multiple%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EGateways%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESingle%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EVirtual%20Service%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20contain%20multiple%20hosts%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EScoped%20to%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3ENamespace%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH5%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--503638206%22%20id%3D%22toc-hId--503518757%22%3E%3CA%20href%3D%22https%3A%2F%2Fistio.io%2Flatest%2Fdocs%2Freference%2Fconfig%2Fnetworking%2Fdestination-rule%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDestination%20Rule%3C%2FSPAN%3E%3C%2FA%3E%3C%2FH5%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDefines%20Policies%20to%20traffic%20post%20Routing%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3ELoadBalancing%2C%20Connection%20Pool%2C%20Outlier%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EScoped%20to%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3ENamespace%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH5%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1983874627%22%20id%3D%22toc-hId-1983994076%22%3E%3CA%20href%3D%22https%3A%2F%2Fistio.io%2Flatest%2Fdocs%2Freference%2Fconfig%2Fnetworking%2Fservice-entry%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EService%20Entry%3C%2FSPAN%3E%3C%2FA%3E%3C%2FH5%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3EEnables%20services%20within%20the%20mesh%20to%20connect%20to%20services%20which%20are%20not%20registered%20with%20the%20mesh%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3EDestination%20service%20endpoints%20can%20be%20External%20to%20mesh%20or%20even%20outside%20the%20cluster%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3EEnables%20the%20most%20important%20concept%20called%20%3CEM%3EShadowing%3C%2FEM%3E%20or%20%3CEM%3EMirroring%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%20us%20now%20delve%20into%20this%20by%20deploying%20%3CEM%3EIstio%3C%2FEM%3E%20on%20an%20existing%20AKS%20cluster.%20This%20article%20would%20assume%20that%20the%20reader%20already%20has%20created%20and%20AKS%20cluster%20of%20any%20form%20and%20is%20able%20to%20access%20the%20cluster%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1973371523%22%20id%3D%22toc-hId-1973490972%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EPlan%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EPrepare%20two%20AKS%20clusters%20-%20%3CSTRONG%3EPrimary%3C%2FSTRONG%3E%20and%20%3CSTRONG%3ESecondary%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDownload%20Istio%20command%20line%20-%20%3CEM%3Eistioctl%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDeploy%20%3CSTRONG%3EIstio%3C%2FSTRONG%3E%20on%20both%20the%20clusters%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDeploy%20multiple%20applications%20onto%20the%20%3CEM%3EPrimary%20%3C%2FEM%3Ecluster%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ECheck%20different%20Service%20Mesh%20features%20on%20the%20P%3CEM%3Erimary%26nbsp%3B%3C%2FEM%3Ecluster%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDeploy%20specific%20version%20of%20one%20application%20(%3CEM%3EHelloWorld%3C%2FEM%3E)%20onto%20%3CEM%3ESecondary%3C%2FEM%3E%20cluster.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EImplement%20Service%20Mirroring%20to%20send%20live%20traffic%20from%20%3CEM%3EPrimary%3C%2FEM%3E%20cluster%20to%20%3CEM%3ESecondary%3C%2FEM%3E%20cluster%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmonojit18%2FServiceMeshWorkshop%2Ftree%2Fmaster%2FIstio%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ESource%20Code%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1396787659%22%20id%3D%22toc-hId-1396907108%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ESet%20CLI%20Variables%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EtenantId%3D%22%22%0AsubscriptionId%3D%22%22%0Alocation%3D%22eastus%22%0AclusterName%3D%22primary-mesh-cluster%22%0AaksResourceGroup%3D%22primary-workshop-rg%22%0AacrName%3D%22srvmeshacr%22%0AbaseFolderPath%3D%22%22%0AprimaryResourceGroup%3D%24aksResourceGroup%0AprimaryClusterName%3D%24clusterName%0AsecondaryResourceGroup%3D%22secondary-workshop-rg%22%0AsecondaryClusterName%3D%22secondary-mesh-cluster%22%0AprimaryAcrName%3D%24acrName%0AistioPath%3D%22%24baseFolderPath%2FIstio%22%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--410666804%22%20id%3D%22toc-hId--410547355%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ELogin%20to%20Azure%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Login%20to%20Azure%0Aaz%20login%20--tenant%20%24tenantId%0A%0A%23Check%20Selected%20Subscription%0Aaz%20account%20show%0A%0A%23Set%20appropriate%20Subscription%2C%20if%20needed%0A%23az%20account%20set%20-s%20%24subscriptionId%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-2076846029%22%20id%3D%22toc-hId-2076965478%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-269391566%22%20id%3D%22toc-hId-269511015%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EConfigure%20Primary%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ECluster%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Set%20Env%20Variable%20for%20Primary%20Cluster%0A%23This%20helps%20to%20switch%20context%20easily%20between%20multiple%20clusters%0Aexport%20CTX_CLUSTER1%3Dprimary%0A%0A%23Connect%20to%20Public%20AKS%20Cluster%20with%20Primary%20Context%0Aaz%20aks%20get-credentials%20-g%20%24aksResourceGroup%20-n%20%24clusterName%20--context%20%24CTX_CLUSTER1%0A%0A%23Additional%20helpful%20commands%0A%23Switch%20context%20between%20multiple%20clusters%0Akubectl%20config%20use-context%20%3CCONTEXT%3E%3C%2FCONTEXT%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1538062897%22%20id%3D%22toc-hId--1537943448%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDownload%20Istio%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Download%20Istio%20binary%0Acurl%20-L%20https%3A%2F%2Fistio.io%2FdownloadIstio%20%7C%20sh%20-%0A%0A%23Download%20specific%20version%20of%20Istio%20viz.%201.11.3%0Acurl%20-L%20https%3A%2F%2Fistio.io%2FdownloadIstio%20%7C%20ISTIO_VERSION%3D1.11.3%20TARGET_ARCH%3Dx86_64%20sh%20-%0A%0A%23The%20istioctl%20client%20binary%20in%20the%20bin%2F%20directory%0A%23Add%20the%20istioctl%20client%20to%20your%20path%20(Linux%20or%20macOS)%3A%0Aexport%20PATH%3D%24PWD%2Fbin%3A%24PATH%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-949449936%22%20id%3D%22toc-hId-949569385%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--858004527%22%20id%3D%22toc-hId--857885078%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ECheck%20Cluster%20Health%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Ekubectl%20get%20no%20--context%3D%24CTX_CLUSTER1%0Akubectl%20get%20ns%20--context%3D%24CTX_CLUSTER1%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1629508306%22%20id%3D%22toc-hId-1629627755%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ECreate%20Namespaces%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Create%20namespaces%20for%20Istio%0Akubectl%20create%20namespace%20istio-system%20--context%20%24CTX_CLUSTER1%0Akubectl%20create%20namespace%20primary%20--context%20%24CTX_CLUSTER1%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH5%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--48863438%22%20id%3D%22toc-hId--48743989%22%3E%26nbsp%3B%3C%2FH5%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1985400620%22%20id%3D%22toc-hId--1985281171%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EInstall%20Istio%20CLI%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Install%20Istio%20CLI%0A%23Select%20Default%20Istio%20Profile%20settings%0A%23Ingress%20Gateway%20with%20Public%20IP%20Address%0Aistioctl%20install%20--context%3D%24CTX_CLUSTER1%20--set%20profile%3Ddefault%20-y%0A%0A%23Install%20Istio%20with%20custom%20configurations%0A%23Ingress%20Gateway%20with%20Privae%20IP%20Address%0A%23Another%20Publicly%20exposed%20LoadBalancer%20Service(L7)%20would%20be%20needed%20to%20access%20this%20Private%20IP%0Aistioctl%20install%20--context%3D%24CTX_CLUSTER1%20-f%20%24istioPath%2FComponents%2Fvalues-primary.yaml%20-y%0A%0A%23Following%20link%20describes%20-%20how%20to%20configure%20Application%20Gateway%20with%20AKS%20cluster%0A%23This%20need%20to%20be%20used%20if%20Ingress%20Gateway%20is%20having%20Private%20IP%0Ahttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapplication-gateway%2Fconfiguration-http-settings%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1200274154%22%20id%3D%22toc-hId-1200393603%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EConfigure%20Istio%20in%20Primary%20Cluster%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--607180309%22%20id%3D%22toc-hId--607060860%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EInject%20Istio%20into%20Namespaces%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Inject%20Istio%20into%20primary%20namespace%0A%23Ensures%20sidecar%20container%20to%20be%20added%20for%20every%20deployment%20in%20this%20namespace%0Akubectl%20label%20namespace%20primary%20istio-injection%3Denabled%20--context%3D%24CTX_CLUSTER1%0A%0A%23Disable%20sidecar%20injection%20from%20primary%20namespace%0A%23kubectl%20label%20namespace%20primary%20istio-injection%3Ddisabled%20--context%3D%24CTX_CLUSTER1%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1880332524%22%20id%3D%22toc-hId-1880451973%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EInstall%20Addons%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Install%20Istio%20Addons%0A%23This%20primarily%20installs%20all%20dependencies%20for%20observability%20by%20Istio%20viz.%20Grafana%2C%20Kiali%20dashboard%20etc.%0Akubectl%20apply%20-f%20%24istioPath%2FComponents%2Fsamples%2Faddons%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20rollout%20status%20of%20the%20Kiali%20deployment%20-%20usually%20takes%20sometime%0Akubectl%20rollout%20status%20deployment%2Fkiali%20-n%20istio-system%0A%0A%23Launch%20Kiali%20as%20background%20process%0Aistioctl%20dashboard%20kiali%26amp%3B%0A%0A%23Might%20need%20to%20Press%20CTRL%2BC%20to%20allow%20the%20job%20to%20continue%20in%20teh%20background%0A%23Bring%20job%20to%20foreground%20-%20fg%20%5B%3CJOB-NUMBER%3E%5D%0A%0A%23Check%20Deployments%20within%20istio-system%0A%23Istio%20Ingress%20gateway%20with%20public%20or%20private%20IP%0Akubectl%20get%20svc%20-n%20istio-system%3C%2FJOB-NUMBER%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-72878061%22%20id%3D%22toc-hId-72997510%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDeploy%20BookInfo%20App%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Install%20BookInfo%20app%20onto%20the%20cluster%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FBookInfo%2Fbookinfo.yaml%20-n%20primary%0A%0A%23Check%20Deployed%20Components%0Akubectl%20get%20svc%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0Akubectl%20get%20pods%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Quick%20check%20to%20test%20BookInfo%20app%0ApodName%3D%24(kubectl%20get%20pod%20-l%20app%3Dratings%20-n%20primary%20-o%20jsonpath%3D'%7B.items%5B0%5D.metadata.name%7D')%0Akubectl%20exec%20%24podName%20-n%20primary%20-c%20ratings%20--%20curl%20-sS%20productpage%3A9080%2Fproductpage%20%7C%20grep%20-o%20%22%3CTITLE%3E.*%3C%2FTITLE%3E%22%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1734576402%22%20id%3D%22toc-hId--1734456953%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EExpose%20Microservices%20thru%20an%20Ingress%20Gateway%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Need%20a%20Gateway%20to%20expose%20the%20service%20outside%0A%23Check%20Routing%20definitions%0A%23Replace%20%3CDNS-NAME%3E%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Get%20GATEWAY_URL%0Akubectl%20get%20svc%20istio-ingressgateway%20-n%20istio-system%0Aexport%20INGRESS_HOST%3D%24(kubectl%20-n%20istio-system%20get%20service%20istio-ingressgateway%20-o%20jsonpath%3D'%7B.status.loadBalancer.ingress%5B0%5D.ip%7D')%0Aexport%20INGRESS_PORT%3D%24(kubectl%20-n%20istio-system%20get%20service%20istio-ingressgateway%20-o%20jsonpath%3D'%7B.spec.ports%5B%3F(%40.name%3D%3D%22http2%22)%5D.port%7D')%0Aexport%20SECURE_INGRESS_PORT%3D%24(kubectl%20-n%20istio-system%20get%20service%20istio-ingressgateway%20-o%20jsonpath%3D'%7B.spec.ports%5B%3F(%40.name%3D%3D%22https%22)%5D.port%7D')%0A%0A%23Call%20services%20using%20GATEWAY_URL%0Aexport%20GATEWAY_URL%3D%24INGRESS_HOST%3A%24INGRESS_PORT%0Aecho%20%22%24GATEWAY_URL%22%0A%0A%23Try%20the%20follwoing%20URL%20in%20the%20Browser%20or%20do%20a%20cUrl%0Acurl%20http%3A%2F%2F%24GATEWAY_URL%2Fproduct%3C%2FDNS-NAME%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-752936431%22%20id%3D%22toc-hId-753055880%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EExpose%20Kiali%20dashboard%20service%20through%20a%20Gateway%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Need%20a%20Gateway%20to%20expose%20the%20Kiali%20service%20outside%0A%23Check%20Routing%20definitions%0A%23Replace%20%3CDNS-NAME%3E%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fkiali-gateway.yaml%20-n%20istio-system%20--context%3D%24CTX_CLUSTER1%0A%0A%23Launch%20Kiali%20in%20the%20browser%0Ahttp%3A%2F%2F%24INGRESS_HOST%3A%24INGRESS_PORT%2F%0A%0A%23If%20used%20with%20Applicagtion%20Gateway%20then%20use%20appropriate%20Host%20header%20in%20Http%20Settings%3C%2FDNS-NAME%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1054518032%22%20id%3D%22toc-hId--1054398583%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EObservability%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-metrics-inbound.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345270iA5B38C58CB05689C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-metrics-inbound.png%22%20alt%3D%22istio-metrics-inbound.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-metrics-oob.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345271i29BEA1189046B670%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-metrics-oob.png%22%20alt%3D%22istio-metrics-oob.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1432994801%22%20id%3D%22toc-hId-1433114250%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ETraffic%20Splitting%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-trafficplit.png%22%20style%3D%22width%3A%20771px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345273i8100F5A96F8E2855%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-trafficplit.png%22%20alt%3D%22istio-trafficplit.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Traffic%20Shifting%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FHelloWorld%2Fhelloworld-app.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0Akubectl%20get%20po%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20definitions%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Destination%20Rule%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fhelloworld-destination-rule.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FHelloWorld%2Fhelloworld-app-v2.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0Akubectl%20get%20po%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20behaviour%0A%23UNCOMMENT%3A%20Test%20Traffic%20Shifting%0A%23Update%20Primary%20Gateway%20Routes%20-%20Change%20Traffic%20weight%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Destination%20Rule%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fhelloworld-destination-rule.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20behaviour%20again%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--374459662%22%20id%3D%22toc-hId--374340213%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EBlue%2FGreen%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-2113053171%22%20id%3D%22toc-hId-2113172620%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-trafficplit-bluegreen.png%22%20style%3D%22width%3A%20771px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345281i8D2D59D04CE421C7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-trafficplit-bluegreen.png%22%20alt%3D%22istio-trafficplit-bluegreen.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Blue%2FGreen%0A%23Deploy%20PodInfo%20Blue%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FBlueGreen%2Fpodinfo-blue.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20definitions%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Destination%20Rule%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fpodinfo-destination-rule.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Deploy%20PodInfo%20green%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FBlueGreen%2Fpodinfo-green.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20behaviour%0A%23UNCOMMENT%3A%20Test%20Blue%2FGreen%0A%23Update%20Primary%20Gateway%20Routes%20-%20Change%20Traffic%20weight%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Destination%20Rule%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fpodinfo-destination-rule.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20behaviour%20again%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1003760649%22%20id%3D%22toc-hId-1003880098%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EService%20Mirroring%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22k8s-mirroring-cross.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345282i0D6949ADB5D15405%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22k8s-mirroring-cross.png%22%20alt%3D%22k8s-mirroring-cross.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--803693814%22%20id%3D%22toc-hId--803574365%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EConfigure%20Secondary%20Cluster%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Service%20Mirroring%20or%20Shadowing%0A%23Create%20Secondary%20Cluster%20-%20CLI%20or%20Portal%0Aexport%20CTX_CLUSTER2%3Dsecondary%0A%0A%23Connect%20to%20Public%20AKS%20Cluster%20with%20Primary%20Context%0Aaz%20aks%20get-credentials%20-g%20%24primaryResourceGroup%20-n%20%24secondaryClusterName%20--context%20%24CTX_CLUSTER2%0A%0Akubectl%20config%20use-context%20%24CTX_CLUSTER2%0A%0A%23Check%20Cluster%20Health%20-%20Secondary%0Akubectl%20get%20no%20--context%3D%24CTX_CLUSTER2%0Akubectl%20get%20ns%20--context%3D%24CTX_CLUSTER2%0Akubectl%20create%20namespace%20istio-system%20--context%20%24CTX_CLUSTER2%0Akubectl%20create%20namespace%20secondary%20--context%20%24CTX_CLUSTER2%0A%0A%23Install%20Istio%20CLI%0A%23Select%20Default%20Istio%20Profile%20settings%0A%23Ingress%20Gateway%20with%20Public%20IP%20Address%0Aistioctl%20install%20--context%3D%24CTX_CLUSTER2%20--set%20profile%3Ddefault%20-y%0A%0A%23Install%20Istio%20with%20custom%20configurations%0A%23Ingress%20Gateway%20with%20Privae%20IP%20Address%0A%23Another%20Publicly%20exposed%20LoadBalancer%20Service(L7)%20would%20be%20needed%20to%20access%20this%20Private%20IP%0Aistioctl%20install%20--context%3D%24CTX_CLUSTER2%20-f%20%24istioPath%2FComponents%2Fvalues-secondary.yaml%20-y%0A%0A%23Inject%20Istio%20into%20Secondary%20namespace%20of%20the%20cluster%20%0A%23This%20ensures%20sidecar%20container%20to%20be%20added%20for%20every%20deployment%20in%20this%20namespace%0Akubectl%20label%20namespace%20secondary%20istio-injection%3Denabled%20--context%3D%24CTX_CLUSTER2%0A%0A%23Install%20Istio%20Addons%0A%23This%20primarily%20installs%20all%20dependencies%20for%20observability%20by%20Istio%20viz.%20Grafana%2C%20Kiali%20dashboard%20etc.%0Akubectl%20apply%20-f%20%24istioPath%2FComponents%2Fsamples%2Faddons%20--context%3D%24CTX_CLUSTER2%0A%0Akubectl%20get%20svc%20istio-ingressgateway%20-n%20istio-system%0Aexport%20INGRESS_HOST%3D%24(kubectl%20-n%20istio-system%20get%20service%20istio-ingressgateway%20-o%20jsonpath%3D'%7B.status.loadBalancer.ingress%5B0%5D.ip%7D')%0Aexport%20INGRESS_PORT%3D%24(kubectl%20-n%20istio-system%20get%20service%20istio-ingressgateway%20-o%20jsonpath%3D'%7B.spec.ports%5B%3F(%40.name%3D%3D%22http2%22)%5D.port%7D')%0Aexport%20SECURE_INGRESS_PORT%3D%24(kubectl%20-n%20istio-system%20get%20service%20istio-ingressgateway%20-o%20jsonpath%3D'%7B.spec.ports%5B%3F(%40.name%3D%3D%22https%22)%5D.port%7D')%0A%0Aexport%20GATEWAY_URL2%3D%24INGRESS_HOST%3A%24INGRESS_PORT%0Aecho%20%22%24GATEWAY_URL2%22%0A%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FHelloWorld%2Fhelloworld-app-v2.yaml%20-n%20secondary%20--context%3D%24CTX_CLUSTER2%0Akubectl%20get%20po%20-n%20secondary%20--context%3D%24CTX_CLUSTER2%0A%0A%23Need%20a%20Gateway%20to%20expose%20the%20service%20outside%0A%23Check%20Routing%20definitions%0A%23Replace%20%3CDNS-NAME%3E%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fsecondary-gateway.yaml%20-n%20secondary%20--context%3D%24CTX_CLUSTER2%0A%0A%23Destination%20Rule%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fhelloworld-v2-destination-rule.yaml%20-n%20secondary%20--context%3D%24CTX_CLUSTER2%0A%0Akubectl%20get%20svc%20-n%20secondary%20--context%3D%24CTX_CLUSTER2%0Akubectl%20describe%20svc%20-n%20secondary%20--context%3D%24CTX_CLUSTER2%0Akubectl%20get%20svc%20-A%20--context%3D%24CTX_CLUSTER2%3C%2FDNS-NAME%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1683819019%22%20id%3D%22toc-hId-1683938468%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EConfigure%20Primary%20to%20Mirror%20services%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Switch%20to%20the%20Primary%20Cluster%0Akubectl%20config%20use-context%20%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20definitions%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Deploy%20components%20so%20that%20Mirroring%20can%20work%0A%23Replace%20%3CDNS-NAME%3E%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-serviceentry.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Destination%20Rule%0A%23Replace%20%3CDNS-NAME%3E%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fhelloworld-destination-rule.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0Akubectl%20get%20svc%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0Akubectl%20describe%20svc%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0Akubectl%20get%20svc%20-A%20--context%3D%24CTX_CLUSTER1%0A%0A%23Call%20helloworld-v1%0A%23Observe%20that%20all%20calls%20being%20replicated%20to%20helloworld-v2%20of%20secondary%20cluster%3C%2FDNS-NAME%3E%3C%2FDNS-NAME%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--123635444%22%20id%3D%22toc-hId--123515995%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ECircuit%20Breaker%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%3EDestination%20Rule%20with%20Circuit%20Breaker%20configurations%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3EapiVersion%3A%20networking.istio.io%2Fv1alpha3%0Akind%3A%20DestinationRule%0Ametadata%3A%0A%20%20name%3A%20httpbin%0Aspec%3A%0A%20%20host%3A%20httpbin%0A%20%20trafficPolicy%3A%0A%20%20%20%20connectionPool%3A%0A%20%20%20%20%20%20tcp%3A%0A%20%20%20%20%20%20%20%20maxConnections%3A%201%0A%20%20%20%20%20%20http%3A%0A%20%20%20%20%20%20%20%20http1MaxPendingRequests%3A%201%0A%20%20%20%20%20%20%20%20maxRequestsPerConnection%3A%201%0A%20%20%20%20outlierDetection%3A%0A%20%20%20%20%20%20consecutive5xxErrors%3A%201%0A%20%20%20%20%20%20interval%3A%201s%0A%20%20%20%20%20%20baseEjectionTime%3A%203m%0A%20%20%20%20%20%20maxEjectionPercent%3A%20100%0AEOF%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Circuit%20Breaker%0A%23Deploy%20HttpBin%20App%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FHttpBin%2Fhttpbin.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fhttpbin-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Deploy%20HttpBin%20Destination%20Rule%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fhttpbin-destination-rule.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Check%20Routing%20behaviour%0A%23UNCOMMENT%3A%20Test%20Circuit%20Breaking%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FNetworking%2Fprimary-gateway.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Generate%20Load%20-%20e.g.%20JMeter%20or%20Fortio%20or%20any%20other%20Laod%20Testing%20client%0A%0A%23Deploy%20Fortio%20client%0Akubectl%20apply%20-f%20%24istioPath%2FExamples%2FHttpBin%2Fsample-client%2Ffortio-deploy.yaml%20-n%20primary%20--context%3D%24CTX_CLUSTER1%0A%0A%23Make%20calls%20from%20Fortio%20client%0Aexport%20FORTIO_POD%3D%24(kubectl%20get%20pods%20-l%20app%3Dfortio%20-o%20'jsonpath%3D%7B.items%5B0%5D.metadata.name%7D')%0Akubectl%20exec%20%22%24FORTIO_POD%22%20-c%20fortio%20--%20%2Fusr%2Fbin%2Ffortio%20curl%20-quiet%20http%3A%2F%2Fhttpbin%3A8000%2Fget%0A%0A%23Check%20Routing%20behaviour%0A%23Observer%20many%20calls%20being%20failed%20and%20circuit%20is%20broken%20and%20joined%20automatically%0A%23Change%20parameters%20in%20the%20%24istioPath%2FExamples%2FNetworking%2Fhttpbin-destination-rule.yaml%20file%0A%23Play%20around%20and%20see%20the%20chnage%20in%20the%20behaviour%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-circuit-break-2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345285iFC314B24BAC29910%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-circuit-break-2.png%22%20alt%3D%22istio-circuit-break-2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1931089907%22%20id%3D%22toc-hId--1930970458%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-556422926%22%20id%3D%22toc-hId-556542375%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDistributed%20Tracing%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-metrics-trace1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345284iC7814232460C0CD8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-metrics-trace1.png%22%20alt%3D%22istio-metrics-trace1.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22istio-metrics-trace2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345283i92C207A8D4ABD19E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22istio-metrics-trace2.png%22%20alt%3D%22istio-metrics-trace2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1251031537%22%20id%3D%22toc-hId--1250912088%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1236481296%22%20id%3D%22toc-hId-1236600745%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--570973167%22%20id%3D%22toc-hId--570853718%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ECleanUP%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%23Cleanup%0A%23Uninstall%20Istio%20setup%20-%20primary%20cluster%0Aistioctl%20x%20uninstall%20--set%20profile%3Ddefault%20--purge%20--context%3D%24CTX_CLUSTER1%0Akubectl%20delete%20namespace%20istio-system%20--context%3D%24CTX_CLUSTER1%0A%20%20%0A%23Uninstall%20Istio%20setup%20-%20secondary%20cluster%0Aistioctl%20x%20uninstall%20--set%20profile%3Ddefault%20--purge%20--context%3D%24CTX_CLUSTER2%0Akubectl%20delete%20namespace%20istio-system%20--context%3D%24CTX_CLUSTER2%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-3112403%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22service-mesh.png%22%20style%3D%22width%3A%20929px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345079i0A407EB4251D25DE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22service-mesh.png%22%20alt%3D%22service-mesh.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20robust%20Service%20Mesh%20for%20Kubernetes%20which%20is%20extensible%20and%20easily%20manageable%20providing%20deep%20insights%20of%20the%20applications%20hosted%20on%20the%20cluster%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3112403%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Kubernetes%20Service%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicroservices%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Feb 04 2022 10:34 AM
Updated by: