2

I have an Azure cosmos DB instance configured to allow access from a private virtual network: icy-horizon. I also have an API deployed using Azure Container Instances with port 80 exposed attached to icy-horizon network as it needs to communicate with the DB.

How can I expose the API to the internet?

Sid
  • 63
  • 1
  • 1
  • 4

1 Answers1

2

In general container groups deployed to a virtual network don't currently support exposing containers directly to the internet with a public IP address or a fully qualified domain name.

You would have to deploy an application gateway in addition to expose the container to the internet. See this Expose a static IP address for a container group for more information.

Matthias Güntert
  • 2,438
  • 12
  • 39
  • 59
  • Hey, Thanks for clearing that up! I was trying to set it up like a VM, using a notwork instance, subnet, nsg, ip and instead of the VM, the container that didn't work cuz container instances deployment couldn't delegate the subnet to the new resource. Thanks! – Sid Aug 14 '20 at 15:49
  • @Sid: I had a similar problem, because I was deploying the container and the application gateway in the same subnet. A subnet can only be delegated once. The solution is to use two subnets inside the same vnet. – Nero Vanbiervliet Sep 21 '21 at 09:52