Azure Container Group IP Address disappeared
Asked Answered
M

3

1

We have an Azure Container Group that had an IP Address assigned upon creation. The IP address is now missing and our application suddenly stopped working.

(i.e. It was set to null, previously the resource had an associated IP address)

Note that our subscription was suspended for 2 weeks and is now back to an active state. If someone can please help us to understand the following: Q1: Where did the IP go? Q2: If the subscription went suspended (as our case), do they deallocate the IP address? Appreciate your feedback the soonest possible on how we can recover the Container Group to a working state.

Thank You

Memoried answered 29/11, 2017 at 7:58 Comment(0)
I
3

ACI's public IP addresses are ephemeral, so you are correct that you are not guaranteed to retain the public IP. To work around this and receive a reliable endpoint for your application, utilize the dns-name-label property for each container group. Details on that can be found here for Azure CLI and here for the REST API.

Infiltration answered 15/2, 2018 at 22:50 Comment(0)
M
1

The IP address of a container won't typically change between updates, but it's not guaranteed to remain the same. As long as the container group is deployed to the same underlying host, the container group retains its IP address. Although rare, and while Azure Container Instances makes every effort to redeploy to the same host, there are some Azure-internal events that can cause redeployment to a different host. To mitigate this issue, always use a DNS name label for your container instances.

Refer to: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-update#limitations

Mercenary answered 1/4, 2019 at 20:57 Comment(0)
F
1

If you are using a template for containers deployment/creation, you can include dnsNameLabel and then use FQDN address instead of an IP.

Template parameters:

"parameters": {
        ...
        "dnsNameLabel": {
            "type": "String",
            "metadata": {
                "description": "FQDN prefix (DNS name label)"
            }
        },
...

and then the IP address part:

"ipAddress": {
                    "type": "Public",
                    "ports": [
                        {
                            "protocol": "TCP",
                            "port": 22
                        }
                    ],
                    "dnsNameLabel": "[parameters('dnsNameLabel')]"
                },
Filibertofilibuster answered 29/11, 2021 at 11:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.