Private IP address for container groupSee 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?
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
@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.
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.