EKS interview question · Most asked
How does the Amazon VPC CNI work, and why do EKS clusters run out of IP addresses?
Summary
The VPC CNI gives every pod a real IP address from the VPC subnet by attaching elastic network interfaces (ENIs) with secondary IPs to nodes. Pods are directly routable in the VPC, which is simple and fast, but each pod consumes a subnet IP, and each instance type supports a limited number of ENIs and IPs per ENI, which caps pods per node.
Longer Answer
IP exhaustion happens with small subnets, many small pods, or the CNI pre-allocating warm IPs. Mitigations:
- Size subnets generously (for example /19 or larger for node subnets) when creating the VPC.
- Prefix delegation: assign /28 prefixes to ENIs, greatly increasing pods per node and allocation speed.
- Custom networking with a secondary CIDR (for example from the 100.64.0.0/10 range) for pod IPs.
- Tune warm pool settings (
WARM_IP_TARGET,MINIMUM_IP_TARGET). - IPv6 clusters avoid IPv4 scarcity entirely.
Key Points
- Pods get VPC IPs via ENIs.
- Pods per node limited by ENIs/IPs.
- Prefix delegation, secondary CIDRs, IPv6.
- Plan subnet sizes early.
More most-asked EKS questions
- How do you secure an EKS cluster end to end?
- EKS or ECS: how would you choose?
- IRSA or EKS Pod Identity: how do pods get AWS permissions?
- Compare the EKS compute options: managed node groups, self-managed nodes, Fargate, Karpenter and EKS Auto Mode.
- How do you expose services on EKS? Explain the AWS Load Balancer Controller.
- How do you upgrade an EKS cluster, and what are standard and extended support?
- Why is Karpenter popular on EKS, and how does it differ from the Cluster Autoscaler?
- What is Amazon EKS, and what does AWS manage versus what do you manage?