Pods with the AWS VPC CNI take long to start and sometimes stay in ContainerCreating with "failed to assign an IP address". What is the design fix?
AdvancedScenarioKubernetes Networking
Answer
Situation read → IP warm pool or subnet exhaustion.
What I'd do →
- Check
kubectl logs -n kube-system ds/aws-nodeandipamdmessages - Verify subnet free IPs and ENI limits per instance type
- Enable prefix delegation to get /28 prefixes per ENI
- Tune
WARM_IP_TARGET,MINIMUM_IP_TARGET - Use custom networking with secondary CIDR
- Choose instance types with more ENIs or use Karpenter with right sizing
Why → Each instance type caps ENIs and IPs per ENI, so density and subnet size both limit pods.
Interview tip → Say max pods formula depends on instance type unless prefix delegation is enabled.
More on Kubernetes Networking
Explain the Kubernetes networking model in one minute.BeginnerClusterIP, NodePort and LoadBalancer: when do you use each?BeginnerHow does a pod find another service by name?BeginnerService versus Ingress: what is the difference?BeginnerWhat does a CNI plugin do and which ones do you know?BeginnerHow do you reach a pod from your laptop for debugging without exposing it?Beginner