I would like to have an static private ip infront of Container instance
I have an usecase, Where I need to have an Container instance which will be doing some processing but whenever we push new image to ACR and restart the Container instance it is getting new private ip. So to handle this scenario, I need to have an static private ip Infront of Container instance. When I tried to attach an Private load balencer with NIC in the backend pool. I was facing the below error Saying "Unable to find any IP configuration that matches the above criteria.". So I'm looking for an solutions for this.
Azure Container Instances
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-11-27T09:48:57.3766667+00:00 Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
As per my understanding, this might be useful using an Internal Load Balancer (ILB) with a static private IP. First, connect your container to a Virtual Network (VNet), which allows you to manage network configuration. Then, create an Internal Load Balancer (ILB) on the same VNet and assign a static IP to it. So, you can access your container through ILB’s static IP, although when you reboot the container, the container itself gets a new internal IP.
Next, you will need to connect your container network interface (NIC) to the Internet load balancer backend pool and configure a health prob to ensure that the load balancer sends traffic only to healthy containers Once everything is configured, the ILB is a container appropriate for the traffic It will always point to, and you will have a consistent static IP to work with without restarting .
Additionally, I can provide you with some documents:
container instances into an Azure virtual network
Create an internal load balancer to load balanceIf you have any further queries, do let us know.
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-11-28T14:32:37.87+00:00 Have you tried the suggestions mentioned above? If so, please let us know if they resolved your issue.
Thank you
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-11-29T10:58:44.95+00:00 Hope you are doing well!
Just checking in to see if you have got a chance to see the comment posted in resolving the issue. If you have any further updates on this issue, please feel free to reach out!
Thank you!
-
Dhandapani, Shankar 0 Reputation points
2024-12-02T11:42:35.3166667+00:00 Hi,
I try the above recommendation and I will update. Thanks
-
Dhandapani, Shankar 0 Reputation points
2024-12-02T13:10:25.4333333+00:00 Hi @Lijitha B
I tried the above recommended setup. But still I cannot attach NIC to the Loadbalencer backend pool. Still, I'm getting "Unable to find any IP configuration that matches the above criteria." -
Lijitha B 510 Reputation points • Microsoft Vendor
2024-12-02T14:41:49.1666667+00:00 Thanks for coming back to us.
I created the entire scenario, attaching a private load balancer with a NIC in the backend pool. However, this is not supported for container instances. For container instances in the backend pool configuration, you need to select an IP address to attach them.
Refer this link: Unsupported networking scenarios
If you have any further queries, do let us know.
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-12-03T13:41:09.03+00:00 Did you get a chance to look into the above comment? Let us know if the issue has been resolved.
Thank you! -
Dhandapani, Shankar 0 Reputation points
2024-12-03T14:03:13.77+00:00 Hi @Lijitha B ,
I did go through your comment. But In my case, The private Ip is getting changed for the Container instance if I do restart CI (Container Instance). So, That is the primary reason I was looking for a solution. As per the above comment, I see that we need to select the IP which is again need to updated manually when there is change in CI IP right?. I am looking for a solution to automate this.
-
Dhandapani, Shankar 0 Reputation points
2024-12-03T14:13:00.1266667+00:00 @Lijitha B Is there any way that I can configure the Private ip of CI in the DNS and whenever there is a change in the IP then DNS should be updated automatically?
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-12-05T11:08:36.1933333+00:00 Thank you for your patience.
Automatically updating the DNS record with the changing private IP address of your container instance isn't possible. You will need to manually update the DNS record each time the IP address changes. However, you can use Azure DNS to assign a domain name to a static private IP address for your container instance. This way, you'll be able to access your container instance using the domain name instead of the IP address.
Refer this link: https://learn.microsoft.com/en-us/azure/dns/private-dns-autoregistration
If you have any further queries, do let us know.
Thank you.
-
Dhandapani, Shankar 0 Reputation points
2024-12-05T12:13:57.22+00:00 Thanks for that @Lijitha B . Though it did not solve our usecase, It helps us to understand the possibilities. I will work on the custom solution for this as per requirement. I would like to see some internal FQDN(Default domain) support for private container instances down the line as like in other services(App service, function app, etc.,) instead of just only IP and that would be helpful. Because, Manually updateing the IP to DNS records will be a pain. If you can send it to the product team, That will be helpful.
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-12-06T13:20:23.4966667+00:00 Sorry for inconvenience, Auto registration works only for virtual machines. For all other resources like internal load balancers, you can create DNS records manually in the private DNS zone linked to the virtual network.
To enable auto registration, select the checkbox for "Enable auto registration" when you create the virtual network link.
Thank you.
-
Lijitha B 510 Reputation points • Microsoft Vendor
2024-12-09T10:24:09.2066667+00:00 Just wanted to check where do you stand with the issue. Please let me know.
Thank you!
Sign in to comment