4

The API seems to support public or private for ip address, but I can't figure out how to get that private ip address on a vnet.

"properties": {
  "containers": [
  ],
  "osType": "Linux",
  "ipAddress": {
  "type": "Public",
  "ports": [
    {
      "protocol": "tcp",
      "port": "[parameters('port')]"
     }
   ]

I'm guessing it's either not documented or not possible yet. I was wondering about exposing multiple IPs, and even though the portal doesn't have it I was able to get it working from the template by just adding it there, so I'm wondering if there is a way to get the instance on a VNET for an internal IP address through the template?

ahmelsayed
  • 7,125
  • 3
  • 28
  • 40
  • It seems like it is possible now to deploy container instances into an Azure virtual network: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet – Stefano Nov 30 '18 at 10:42

2 Answers2

4

Azure Container Instances currently don't have VNet integration, so it's not possible to get a private ip - we will have it by the time Azure Container Instances reaches GA. Thanks!

Ria Bhatia
  • 81
  • 1
  • 1
    @Stuart.Sklinar looks like you can make private via the portal: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart-portal – Starchand Apr 12 '18 at 19:34
  • Just feedback on @Starchand 's comment, it does not seem to be possible to specify anything other than Public or None IP at this time. It has been GA only a few days, so this might change at some point. See documentation here: https://learn.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az-container-create – krembanan Apr 26 '18 at 06:22
  • 2
    Ok, so what is the recommended way to communicate with non-public container instances? E.g. when I have a containerized (Docker) public api that also functions as a gateway to containerized (Docker) microservices that are running private? Can I use a hostname? – Jos May 02 '18 at 11:01
  • 4
    I just put up a container registry and created a container that I do not want on the internet. I need to mount volumes and Azure files would be OK. But how do open and access my inbound ports? I have to ask, what good is a private container without a network connection? – BigTFromAZ May 14 '18 at 15:40
  • Any answers to this? – johnstaveley Dec 07 '18 at 13:47
  • 2020, still have to consult google to reach containers with private ips.. – stmax May 04 '20 at 14:23
1

Looks like this feature is now in preview:
https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet

Tom Makin
  • 3,203
  • 23
  • 23