Linux preview support of custom virtual networks on Azure Container Instances
Updated: November 13, 2019
You can now provision Linux containers into new or existing virtual networks with Azure Container Instances. This support is now in preview for Linux in two regions: West US and West Europe.
Previously, you were unable to run Container Instances in a custom virtual network and assign private IP addresses to container groups. Support was limited to assigning a public IP address with optional DNS names or restricting inbound connectivity to your container.
Now, you can join Container Instances to your existing network infrastructure by delegating a subnet to the ContainerGroups resource. This enables Container Instances to receive private IP addresses, maintain outbound internet connectivity, communicate with other resources secured on the same virtual network, communicate with service endpoints, and communicate with on-premises resources connected through Azure ExpressRoute.
You can complete this by using a single
az container create command, with details about the virtual network and subnet that you want to join into.
az container create –resource-group myRG –name myContainer –location westus –vnet mynetwork –subnet mysubnet –image Microsoft/aci-helloworld
Azure Resource Manager templates and SDKs are also supported. Simply reference the Network Profile resource in your deployment configuration for container groups.
To learn more about how you can use virtual networks with Container Instances, read the virtual network integration documentation.
To provide input and feature requests, visit our UserVoice.