Following are my queries:
How to simulate Availability Zone Outage on Azure Kubernetes Service to verify incoming traffic switching is done to another zone ?
Is there any way to figure out which Zone or which Node is currently receiving the incoming requests on Azure Kubernetes Service ?
It's not clear what you mean by verify incoming traffic switching. There is no traffic switching, the traffic will go to the pods that are currently available to respond to the request. You are responsible for distributing the replicas across the different Availability Zone in your cluster. if for example you have deploy a Pod with two replicas, one in zone 1 and another in zone 2, the traffic will go to both replicas, if zone 1 goes down, the Load Balancer will only send the traffic to the pod in zone 2 until the pod in zone 1 is back.
One easy way to test it is to stop or restart the VMs in one Availability Zone and check if you experience down time.
Like I said, it is not one zone at a time, you need to deploy replicas in all the Availability Zone if you want zone-resiliency and this it is not done automatically by AKS. One way to do it is by configuring podAntiAffinity on your Pod to make sure the replicas are not deployed on the same node and in the same Availability Zone. In AKS, the nodes have a label
topology.kubernetes.io/zone
which contains the zone number, you can use that label in the podAntiAffinity rule. The following command will give you the list of nodes with the different Zones :