Interview Prep/Kubernetes/EKS-specific issues

Pods are stuck in ContainerCreating and the aws-node logs show `InsufficientFreeAddressesInSubnet` / `failed to assign an IP address to container`.

AdvancedTroubleshootingEKS-specific issues
Answer

Likely causes → VPC CNI IP exhaustion. Every Pod gets a real VPC IP, and the CNI pre-allocates warm IPs per node. Small subnets (/24) run out quickly as the cluster grows.

Diagnose →

aws ec2 describe-subnets --subnet-ids subnet-0a subnet-0b --query 'Subnets[].[SubnetId,AvailableIpAddressCount]'
kubectl get ds aws-node -n kube-system -o yaml | yq '.spec.template.spec.containers[0].env'
kubectl logs -n kube-system -l k8s-app=aws-node -c aws-node --tail=50 | grep -i -E 'insufficient|failed to assign'

Fix → Short term: lower warm pool settings (WARM_IP_TARGET, MINIMUM_IP_TARGET) so nodes do not hoard IPs. Structural: add a secondary CIDR (100.64.0.0/16) with custom networking (ENIConfig per AZ) for Pods, or enable prefix delegation in subnets with contiguous /28 space.

Prevent → Plan large Pod subnets up front, monitor AvailableIpAddressCount, and consider IPv6 clusters for very large scale.

All Kubernetes questions

More on EKS-specific issues