Could you please follow the below steps to resolve this issue:
- Run the command kubectl get nodes in a terminal or in Azure Cloud Shell to verify all nodes are in a ready state. If not, use kubectl describe node to identify node issues such as taints, events, or conditions affecting the node.
- Access the overall AKS Cluster health by executing:
az aks show -g -n --query "provisioningState". It should return succeeded. - Retrieve the status of all pods with- kubectl get pods -A and ensure your web app pod is running. If the pods fails or encounter errors, then check the logs with the command kubectl logs <pod name>
- Verify whether Kube-proxy pods are active -
kubectl get pods -n kube-system | grep kube-proxy. If missing, restart the kube-proxy DaemonSet - kubectl rollout restart daemonset kube-proxy -n kube-system.
If kube-proxy is failing, check network policies: kubectl get networkpolicy -n kube-system and ensure no network policies are blocking kube-proxy communication. - Retrieve the list of Kubernetes services to look for the web app service by running the command - kubectl get svc -A and ensure that the service type is set to Loadbalancer for your web application. Test the Loadbalancer service and ensure that its external IP Address is not in a pending state: curl http://<external-ip>
- Access the ingress controller access with the command - kubectl get pods -n ingress-nginx and verify the service exposing the ingress controller with the command - kubectl get svc -n ingress-nginx. Ensure the service type should be Loadbalancer with an external IP Address.
- Also, ensure NSG Rules must allow TCP 80/443 inbound to the subnet or VMSS.
- If the issue persists, restart the affected services - kubeproxy pods, ingress controller and recreate the loadbalancer and then test access to your application using the external IP: curl http://<external-ip>
Additional references:
https://learn.microsoft.com/en-us/azure/aks/configure-kube-proxy
Hope this helps!
Please Let me know if you have any queries. If you found the information helpful, please click "Upvote" on the post to let us know and consider accepting the answer as the token of appreciation. Thank You.