It’s not uncommon to have AGIC not working. When encountering issues with Azure Application Gateway as an ingress controller, the following steps can be taken to troubleshoot the problem:
- Check the logs of the Application Gateway Ingress Controller (AGIC) pod for any error messages.
kubectl logs -n kube-system -l app=ingress-azure
- Verify that the AGIC pod is running and the desired number of replicas is met.
kubectl get pods -n kube-system -l app=ingress-azure
- Verify that the AGIC is correctly configured by checking that the pod’s environment variables match the expected values.
kubectl exec -it -n kube-system <agic-pod-name> env
- Verify that the AGIC has the correct permissions to access the Application Gateway.
- Check the status of the Application Gateway using the Azure Portal or the Azure CLI.
az network application-gateway show -g <resource-group> -n <app-gateway-name>
- Check the routing rules defined in the Application Gateway to ensure they match the ingress rules defined in the Kubernetes cluster.
- Check that the Application Gateway’s public IP address is correctly associated with the ingress rules.
- Check that the target service is responding and that it has the correct IP address and ports.
It is important to note that these steps are a basic guide and there may be more complex issues that require further investigation.