问题
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
回答1:
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.
回答2:
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://docs.microsoft.com/en-us/azure/container-instances/container-instances-update#limitations
来源:https://stackoverflow.com/questions/47547693/azure-container-group-ip-address-disappeared