DEV Community

Cover image for Why your EKS node shows 110 Pods when the formula says 234
Thanh Huy
Thanh Huy

Posted on Edited on

Why your EKS node shows 110 Pods when the formula says 234

You add an m5.4xlarge to a managed node group, run kubectl describe node, and see pods: 110. The AWS documentation for the VPC CNI says the same instance supports 234. Both numbers are right; they come from two different rules.

Rule 1: Pods need IP addresses

With the Amazon VPC CNI, every Pod gets a real VPC address from one of the node's network interfaces (ENIs). The limit per node is therefore set by the instance's networking, not its CPU or memory:

max Pods = ENIs × (IPs per ENI − 1) + 2
Enter fullscreen mode Exit fullscreen mode

Each ENI keeps one address for itself, hence the − 1. The + 2 is for the Pods that use the node's own address (the VPC CNI and kube-proxy run with host networking).

Instance ENIs × IPs Formula
m5.large 3 × 10 29
m5.xlarge 4 × 15 58
m5.4xlarge 8 × 30 234
m5.16xlarge 15 × 50 737

Two consequences people trip over:

  • More CPU does not mean more Pods. m5.xlarge and m5.2xlarge both allow 58; m5.4xlarge, 8xlarge and 12xlarge all allow 234.
  • Newer generations usually do not change it. m5, m6i and m7i allow the same number on every size they share; the generations differ in which sizes exist, not in the limit.

Rule 2: managed node groups cap it

When a managed node group launches nodes without a custom AMI, EKS sets maxPods itself and caps it: 110 below 30 vCPUs, 250 from 30 vCPUs. The m5.4xlarge has 16 vCPUs, so 234 becomes 110. The m5.16xlarge (64 vCPUs) goes from 737 to 250. The cap wins over any other setting in that case.

If you really need more Pods per node, use a launch template with a custom AMI (or self-managed nodes) and set maxPods yourself. Check first that you want to: 110 Pods on 16 vCPUs is already about 145m CPU per Pod.

Prefix delegation

With ENABLE_PREFIX_DELEGATION=true (VPC CNI 1.9.0 or later, Nitro instances), each IP slot on an ENI holds a /28 prefix of 16 addresses instead of one address. An m5.large goes from 29 to the 110 cap. It needs free contiguous /28 blocks in the subnet; a fragmented subnet fails with InsufficientCidrBlocks. The managed node group cap still applies.

Check what a node actually got

kubectl get nodes -o custom-columns=NAME:.metadata.name,TYPE:.metadata.labels.node\.kubernetes\.io/instance-type,PODS:.status.capacity.pods
Enter fullscreen mode Exit fullscreen mode

If the number differs from the formula, either the cap applies or maxPods was set explicitly.

The numbers for every size

I put the formula, the cap and prefix delegation into a calculator that reads AWS's own instance data, and a page with 13 common families (T, M, C, R; Intel, AMD and Graviton) side by side:

Both run in the browser. If you are also sizing the subnets for those Pods, https://opspane.dev/network/vpc-subnet-planner/ does the address math per Availability Zone.

Have you run custom AMIs just to go past 110 Pods per node? Was it worth it?

Top comments (5)

Collapse
 
rushdeploy profile image
Rishabh Mishra •

The 110 cap catching people by surprise makes sense, since the formula alone looks correct. I like the reminder that more CPU does not mean more pods, because the limit is really about IP addresses. The prefix delegation note is useful too, especially the warning about fragmented subnets.

Collapse
 
nthuy25 profile image
Thanh Huy •

Thanks! The fragmentation one bit me the hardest, because the subnet still shows plenty of free IPs while the CNI can't find a single contiguous /28. Two things that help: a VPC subnet CIDR reservation (aws ec2 create-subnet-cidr-reservation --reservation-type prefix) so other ENIs can't scatter addresses across the range, or dedicated subnets for prefix-delegated nodes.

Have you run into the cap in practice, or mostly hit the IP limit on smaller nodes?

Collapse
 
rushdeploy profile image
Rishabh Mishra •

Mostly the IP limit on smaller nodes — on m5.large and xlarge the formula binds well below 110, so the cap only showed up for me on 4xlarge and up.
Your CIDR reservation tip is a good one; fencing off a prefix range beats debugging InsufficientCidrBlocks after the fact.

Thread Thread
 
nthuy25 profile image
Thanh Huy •

Same experience here. One twist: turn on prefix delegation and the small nodes flip sides. An m5.large goes from 29 straight to the 110 cap, so the IP limit stops binding and CPU and memory requests usually become the real ceiling. Thanks for the follow-up!

Thread Thread
 
rushdeploy profile image
Rishabh Mishra •

That flip is a good way to put it — once prefix delegation lifts the IP ceiling, the requests are what actually decide how many pods fit.
I would still check the subnet for free /28 blocks first, since that is the part that quietly blocks the jump to 110.