Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attaching a private static ip address to Azure Container Instance

I am searching for a solution with static private IPs for my container instances. I will add the Application Gateway to it to also have a static public IP for it.

I am checking https://stackoverflow.com/a/59168070/7267638 and it looks good until "Add the private IP of the container instance into the backend pool of the application gateway". The point which is not clear to me is what to do when I restart the container and add others in the meantime - it can end up with different private IPs.

I need to have them static not only to be able to configure backend pool for the Gateway, but also for internal routing purposes. Without some kind of static config, I would need to reconfigure all services after private IP change to be able to find each other again.

Maybe can I use some kind of internal DNS or use container names or so?

like image 843
O1da Avatar asked Aug 27 '20 08:08

O1da


People also ask

How do I assign a private IP to Azure?

In the network interface properties, select IP configurations in Settings. Select ipconfig1 in the IP configurations page. Select Static in Assignment. Select Save.

Can we assign static IP to Azure VM?

Static IP can also be assigned to an Azure VM during creation. When you create a VM, once the initial validation process completed, follow the below steps. Click on Networking tab. Under Network interface, next to Public IP, click Create new, set Assignment as Static, and click OK.


1 Answers

Private static IPs for ACI is (as of today) not supported. I don't think there is a real workaround here except for checking after a container has been (re-)started if the IP has been changed.

Your best bet might be to use subnets of the minimum required size when putting ACI into a subnet - and only use one ACI per subnet. This way the chance might be lower that the IP actually changes, but still no guarantees there.

like image 130
silent Avatar answered Sep 28 '22 05:09

silent