McKube 0 requests sent

FailedCreatePodSandBox: CNI Out of Pod IP Addresses

Fix AWS VPC CNI, Calico, and Cilium sandbox failures when subnets or ENI IP pools run out of addresses.

CRITICAL · FailedCreatePodSandBox

Root Cause

The node CNI plugin could not allocate an IPv4 or IPv6 address for the Pod network sandbox (subnet IP exhaustion, EC2 ENI IP cap reached, or unhealthy CNI DaemonSet).

Why It Happens

On AWS EKS with the default VPC CNI, every Pod consumes a real VPC subnet IP and every EC2 instance type has a hard ENI + IPv4 cap (for example 29 pods on m5.large). Enabling AWS VPC CNI prefix delegation assigns /28 prefixes per ENI and raises pod density dramatically, while secondary CIDR blocks relieve small subnets.

What It Looks Like in kubectl describe

Name:         api-2
Namespace:    shop
Events:
  Warning  FailedCreatePodSandBox  20s  kubelet  Failed to create pod sandbox: plugin type="aws-cni" failed (add): add cmd: failed to assign an IP address to container

How to Fix

  • Check available IPv4 addresses in the worker node VPC subnet and verify EC2 ENI max-pod limits in McKube Node Tetris.
  • On AWS EKS, enable VPC CNI prefix delegation (ENABLE_PREFIX_DELEGATION=true) or attach a secondary RFC1918 CIDR block.
  • Inspect CNI DaemonSet pod logs (aws-node, cilium, calico-node) in kube-system for IPAM errors.

Diagnostic Commands

kubectl get pods -n kube-system -l k8s-app=aws-node
kubectl get events -n <ns> --field-selector involvedObject.name=<pod>