Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Private IP address for container group

See original GitHub issue

Hi there, is me again 😃

I tried to deploy a container group for testing, but it show me the error

"IP Address type in container group 'MyContainerGroup' is invalid. Private IP address is only supported when network profile is defined

But how I can define it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

ninjarobotcommented, Jun 11, 2021

@clement128 the ACI team dropped support for specifying a private IP address on a container group. You can generally count on it being the 4th address in the subnet if there is only one container group, but this can create challenges when there are multiple container groups in a subnet. If they are both restarted at the same time, the first one to start will get the 4th IP, the second one will get the 5th IP, etc.

I recommend instead that you put each container group in a small subnet, like a /29 and then put a static private IP address on a load balancer with the backend pool configured for all the possible addresses for the container group. A /29 subnet has 3 possible addresses that it could have. Then you can count on the fixed private IP address of the load balancer and let it deal with the possibly floating addresses of the container group. If you have multiple container groups, put each in their own /29 subnet with their own private IP frontend on the load balancer.

The load balancer example in the docs creates a load balancer with a backend pool using the addresses in one of the subnets. You can combine that with the private container group example that deploys the container group to a subnet.

ninjarobotcommented, May 6, 2020

Hey…I can pick this up as we do this now. It’s a small difference in the container group template itself because you specify a private IP and aren’t allowed to specify the DNS host name since private containers don’t get one. It also needs to go into a vnet subnet with the container network profile, so a few more pieces to really use it that we need to add on the vnet resource.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expose a static IP address for a container group
This article shows one way to expose a static, public IP address for a container group by using an Azure application gateway. Follow...
Read more >
private ip for azure container instance
The API seems to support public or private for ip address, but I can't figure out how to get that private ip address...
Read more >
Azure Container Instance - Private IP management using DNS
Private DNS. Unlike Azure VM's, container instances don't automatically register and synchronise the IP address with the associated DNS record.
Read more >
Configure a single public IP address for outbound and inbound traffic to a container group. Setting up a container group with an external-facing...
Read more >
You Can Give a Static IP to Azure Containers? - YouTube
... show you how you can give an Azure Container a static IP address. ... private ip but it's not working you would...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found