Exercise 1: Enable the Istio Add-on
In this exercise, you will remove the Application Routing Gateway API add-on, enable Istio using the AKS add-on, confirm the managed control plane is running, and enable an external Istio ingress gateway.
Info
This lab uses sidecar injection because it is the most widely understood Istio data plane model and is supported by the AKS Istio add-on experience. Ambient mesh is covered in the education module, but is not used in this short lab.
Task 1: Remove the Application Routing Gateway API Add-on
In Lab 1
the cluster was created with the Application Routing Gateway API add-on (--enable-app-routing-istio). That add-on deploys its own managed Istio control plane, and the Istio service mesh add-on cannot be enabled at the same time
. You must disable it before enabling the service mesh add-on. Once it is removed you will no longer have a managed ingress, which is why this lab stands up an Istio ingress gateway in Task 3.
Disable the Application Routing Gateway API add-on.
az aks update ` --resource-group $RESOURCE_GROUP ` --name $AKS_NAME ` --disable-app-routing-istioaz aks update \ --resource-group $RESOURCE_GROUP \ --name $AKS_NAME \ --disable-app-routing-istioRemove the
approuting-istioGatewayClassleft behind by the add-on so it does not conflict with the service mesh add-on.kubectl delete gatewayclass approuting-istio --ignore-not-foundkubectl delete gatewayclass approuting-istio --ignore-not-foundTip
The Managed Gateway API CRDs (
--enable-gateway-api) can stay enabled — they are just the Gateway API resource definitions and do not conflict with the Istio service mesh add-on.
Task 2: Enable the Istio Add-on
Enable the Istio service mesh add-on on your AKS cluster.
az aks mesh enable ` --resource-group $RESOURCE_GROUP ` --name $AKS_NAMEaz aks mesh enable \ --resource-group $RESOURCE_GROUP \ --name $AKS_NAMECheck that the add-on is enabled and that
istiodis running.az aks show ` --resource-group $RESOURCE_GROUP ` --name $AKS_NAME ` --query "serviceMeshProfile.mode" ` -o tsv kubectl get pods -n aks-istio-systemaz aks show \ --resource-group $RESOURCE_GROUP \ --name $AKS_NAME \ --query "serviceMeshProfile.mode" \ -o tsv kubectl get pods -n aks-istio-systemThe Azure CLI command should return
Istio, and you should seeistiodrunning in theaks-istio-systemnamespace.Store the installed revision in a variable. This revision is used to enable sidecar injection for a namespace.
$ISTIO_REVISION = az aks show ` --resource-group $RESOURCE_GROUP ` --name $AKS_NAME ` --query "serviceMeshProfile.istio.revisions[0]" ` -o tsv Write-Host $ISTIO_REVISIONISTIO_REVISION=$(az aks show \ --resource-group $RESOURCE_GROUP \ --name $AKS_NAME \ --query "serviceMeshProfile.istio.revisions[0]" \ -o tsv) echo "$ISTIO_REVISION"
Task 3: Enable an Istio Ingress Gateway
The AKS Istio add-on installs the control plane. For ingress traffic, you also need to enable an Istio ingress gateway.
Enable an external Istio ingress gateway.
az aks mesh enable-ingress-gateway ` --resource-group $RESOURCE_GROUP ` --name $AKS_NAME ` --ingress-gateway-type externalaz aks mesh enable-ingress-gateway \ --resource-group $RESOURCE_GROUP \ --name $AKS_NAME \ --ingress-gateway-type externalVerify that the gateway pods and service are running.
kubectl get pods -n aks-istio-ingress kubectl get service -n aks-istio-ingresskubectl get pods -n aks-istio-ingress kubectl get service -n aks-istio-ingress