Maximum number of pods
Introduction
Thank you for clicking through to my arcticle. I've been a DevOps engineer for 2 years in dev-team of 7 engineers.
My name is MINSEOK, LEE, but I use Unchaptered as an alias on the interenet. So, you can call me anythings "MINSEOK, LEE" or "Unchaptered" to ask something.
[Notice]
3 way to allocate ip address
Secondary IPv4 Addresses
Calculate the allowable ip address and maximum eni amount according to instance type.
Max Pods = ENI x (Supported Priv IPv4 - 1) x 2
IPv4 prefix delegation
Calculate the allowable ip address and maximum eni amount according to instance type, delegate to IPv4 28bit subnetting.
Max Pods = (ENI x (Supported Priv IPv4 - 1)) x 2
AWS VPC CNI Custom Networking → Link
History of prefix assign mode with CNI Plugin
= IPv4 Prefix Deleagtion
As a august 2021, Amazon VPC CNI Plugin supports "prefix assignment mode", enabling you to run more pods in each node if it's AWS Nitro based EC2 instance types.
Amazon VPC CNI prefix assignment mode
What's the pod?
The pods is most smallest deployment unit in kubernetes.
The one pod need unique IP address to communicate in kubernetes cluster.
Amazon EKS execute basic VPC CNI plugin and manage network interface and ip address and allocate ip address into pod.
With prefix assignment mode,
AS-IS, individual IPv4 addresses to network interface
TO-BE, 8.8.8.4 subnet masks (/28, 16 IP addresses) address prefix
How it works?
Amazon VPC CNI is deployed on worker nodes as a Kubernetes DaemonSet with the name "aws-node".
The VPC CNI Plugin consists of 2 primary components:
L-IPAMD(Local IP Address Management Daemon)
It's responsible for:creating and attaching network interfaces to worker nodes.
assigning prefixes to network interfaces
maintaining a warm pool of IP prefixes on each node for assignment to pods as they are scheduled.
VPC CNI Plugin
It's responsible for:writing the host network
adding the correct network interface to a pod's namespace
The CNI plugin communicates with IPAMD via remote procedure calls.
If you want more information, read this post.