Azure container Instance in a Vnet doesn't support static IP or DNS name

Md Farman Khan 36 Reputation points
2020-12-16T14:09:59.507+00:00

Hi,

I am deploying containers in ACI group in a private V-Net and the main problem which I am facing is that this doesn't support a DNS name label and also I can't set a static IP to it. As the IP is not static and there is no DNS name label, when we stop the containers then there is no guarantee that the private IP will remain the same when we start it again.

As the ACI group IP is required to access the apps running in the containers through an API end point and on the instance of IP change we have to change the IP everywhere again, which is not feasible.

Another disadvantage is that, as we can't set a pre-defined IP address for ACI the IP address will only be known after the ACI is started in Azure. This way we can't provide the ACI IP/URI as our environment variable in ACI YAML script which is required in our app to send the app API URI to other apps.

The above problems will be resolved if we deploy ACI publicly, but as this method has no restriction and no NSG support, we can no way afford to expose our Application APIs in the open internet.

Please suggest how to tackle this issue of absence of static IP or DNS name label in an ACI in private V-Net.

Thank You.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
643 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Thomas Meckel 1 Reputation point
    2022-05-06T14:48:26.9+00:00

    I created aci-dns-manager for this. It's a standalone program that can be used either inside a sidecar container or in the startup script (favorable s6-init) to configure the DNS entry for an ACI.

    It's available here -> [aci-dns-manager][1]https://github.com/tmeckel/aci-dns-manager

    0 comments No comments