Hello nishan Pa
It appears you're experiencing a 502 Bad Gateway error when connecting your Azure Application Gateway to your private Azure Container Apps. This usually means the Application Gateway can't reach the backend service. Possible reasons include incorrect backend pool configuration, failing health probes, or DNS resolution issues leading to an unreachable IP address.
Please review the following information:
To expose internal Azure Container Apps through Application Gateway, follow these steps:
- Use a Private DNS Zone: Internal ingress for Azure Container Apps registers their FQDN in a private DNS zone (*.internal.azurecontainerapps.io). Ensure that your Application Gateway subnet is linked to this private DNS zone or uses a custom DNS server that can resolve it.
- Configure Application Gateway with Private Link or IP: Instead of the FQDN, set the backend pool to use the private IP address of the Container App environment.
Note that Container Apps provide a stable IP per environment, not per app, so you may need to route traffic to the environment and use path-based routing.
- Set up custom health probes: Make sure the probes match the required path and headers for your container app and use HTTP/HTTPS with the correct port (typically 80 or 443).
I hope this helps! If these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.
If the above is unclear or you are unsure about something, please add a comment below.