Share via

My application gateway is not exposing the service endpoints hosted on my private AKS cluster

cargobuddy 20 Reputation points
2026-03-17T09:35:51.6633333+00:00

Perhaps I am missing something in the listener and backend configuration, but not sure. I am not able to configure the endpoints, and the backend always results into 502 error.

Azure Application Gateway
Azure Application Gateway

An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.


2 answers

Sort by: Most helpful
  1. cargobuddy 20 Reputation points
    2026-03-30T12:00:40.73+00:00

    User's image

    Hello,

    Not sure whether I could explain you the original problem. Let me explain that again:

    As shown in the image above, the Ingress controller somehow deletes my manually created listener, and adds the above listener. However, that listener uses the HTTP protocol and port 80, despite of the fact that my ingress already specifies the TLS name, which is the same as the certificate name I have uploaded on my key-vault. Then after knowing this, again I had to manually create the listener with port 443 and HTTPS protocol, and delete the automatically created listener. Do I miss anything in my cluster or the ingress ? Kindly let me know as it is a production deployment. My root question is, why is my listener deleted. At least the AGIC should not delete any manually created configurations. That's a bug.

    0 comments No comments

  2. Sina Salam 28,281 Reputation points Volunteer Moderator
    2026-03-30T01:23:35.3333333+00:00

    Hello cargobuddy,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your application gateway is not exposing the service endpoints hosted on my private AKS cluster.

    The issue is not that Application Gateway “fails to expose endpoints”, but that it cannot reach or validate your AKS backend, usually because of failed health probes or network connectivity, resulting in HTTP 502 errors.

    Follow the below steps to resolve it:

    1. Verify your workload returns 200 OK within the cluster using: kubectl port-forward svc/<service> 8080:<port> curl `http://localhost:8080` If the app fails internally, fix it first – https://learn.microsoft.com/azure/aks/troubleshooting.
    2. Check that the service exposes the expected pod IPs and ports: kubectl describe svc <service> kubectl describe endpoints <service> You must see healthy endpoints mapped to pods.
    3. If your application does not respond on /, configure the correct probe path: annotations:   appgw.ingress.kubernetes.io/health-probe-path: "/health" Any exposed path must return HTTP 200, as required by App Gateway health probes -https://learn.microsoft.com/azure/application-gateway/application-gateway-probe-overview.
    4. Ensure the Ingress is correctly bound to Application Gateway: annotations:   kubernetes.io/ingress.class: azure/application-gateway Also confirm that your service ports match the backend container target ports.
    5. Review AGIC logs for configuration sync or backend pool errors: kubectl logs -n kube-system -l app=ingress-appgw The controller should continuously update listeners, rules, and backend pools -https://learn.microsoft.com/azure/application-gateway/ingress-controller-overview.
    6. Check the backend addresses from Application Gateway: az network application-gateway show </span> --name <appgw> </span> --resource-group <rg> </span> --query backendAddressPools Compare with: kubectl get Both must contain the same pod IPs, as documented in Azure Backend Pool requirements.
    7. Ensure the App Gateway subnet can reach pod CIDR and node subnet by checking NSGs, UDRs, and bidirectional VNet peering - https://learn.microsoft.com/azure/aks/upgrade-cluster#validate-networking.
    8. Verify that the gateway itself is healthy: az network application-gateway show </span>   --name <appgw> </span>   --resource-group <rg> </span>   --query operationalState It must show Running before traffic can be routed correctly.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.