Expose internal Azure Container App's for external client access through Application Gateway

nikola perac 5 Reputation points
2023-07-27T09:39:52.72+00:00

I have set up a container apps environment that is sitting within a VNET. Containers within need to be accessed externally through application gateway. Following steps in this learn.microsoft page has not given me the results I need:

https://video2.skills-academy.com/en-us/azure/container-apps/waf-app-gateway?tabs=default-domain

When setup, the application gateway does its job, if I follow its public IP I get redirected to the container apps FQDN. My problem, is clients not accessing said containers. Since its behind a VNET, every request gets ERR_NAME_NOT_RESOLVED or in other words the container ip address could be found since its within private network.

From the document, in the first paragraph it says "When you host your apps or microservices in Azure Container Apps, you may not always want to publish them directly to the internet. Instead, you may want to expose them through a reverse proxy.", reverse proxy being application gateway.

How can I make my container, that is behind a VNET, accessible to outside clients that want to access it, through application gateway?

If you need any additional information just ask and I will be happy to provide it if I can.

Thank you for reading and your assistance.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,003 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
329 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,271 Reputation points Microsoft Employee
    2023-07-27T12:11:11.0666667+00:00

    Hi, if you have configured a HTTP to https redirection in your application, then your application sends the fqdn on the location header to the client and since the fqdn is internal, client will experience timeout. If that is the case, then you will need to perform the redirection on the Application Gateway and remove it from the application. If this is not the case, please take screenshot while opening the site and share the developer tool request snapshot here.

    0 comments No comments