EKS Prefix Delegation - IP Planning Guide
π Your Subnet Configuration
| Subnet | CIDR | Available IPs | Availability Zone |
|---|---|---|---|
| Subnet 1 | 10.50.64.0/20 | 4,096 IPs | AZ-1 |
| Subnet 2 | 10.50.112.0/20 | 4,096 IPs | AZ-2 |
| Subnet 3 | 10.50.16.0/20 | 4,096 IPs | AZ-3 |
π How Prefix Delegation Works
Traditional Secondary IP Mode (Before)
Prefix Delegation Mode (Now)
π₯οΈ Your Node Configuration (m6g.large)
Network Interface Limits:
- ENIs per node: 3 ENIs maximum
- Prefixes per ENI: 16 prefixes (with prefix delegation)
- IPs per prefix: 16 IPs (/28 CIDR block)
IP Allocation per Node:
π‘ How Your Configuration Works
With WARM_PREFIX_TARGET = β1β
When a node starts:-
Initial allocation: Requests 1 prefix (/28 = 16 IPs) per ENI
- 3 ENIs Γ 1 prefix Γ 16 IPs = 48 IPs reserved initially
- Plus 1 primary IP for node = 49 IPs per node
-
As pods are scheduled:
- When 15 out of 16 IPs in a prefix are used
- VPC CNI requests another /28 prefix (16 more IPs)
- Keeps 1 βwarmβ prefix ready at all times
-
Maximum allocation per node:
- Up to 110 pods (Kubernetes limit)
- Each pod = 1 IP
- Actual IPs requested = ~7-8 prefixes Γ 16 = 112-128 IPs per node
π Your Capacity Calculation
Current Node Group (1-2 nodes):
| Nodes | IPs Used (Initial) | IPs Used (Full) | Subnet Impact |
|---|---|---|---|
| 2 nodes | 2 Γ 49 = 98 IPs | 2 Γ 128 = 256 IPs | Minimal |
Scaled Node Group (Max capacity scenarios):
Letβs calculate different scenarios:Scenario 1: 10 Nodes
- Initial: 10 Γ 49 = 490 IPs
- Full capacity: 10 Γ 128 = 1,280 IPs
- Pods: 10 Γ 110 = 1,100 pods
Scenario 2: 50 Nodes
- Initial: 50 Γ 49 = 2,450 IPs
- Full capacity: 50 Γ 128 = 6,400 IPs
- Pods: 50 Γ 110 = 5,500 pods
Scenario 3: 100 Nodes
- Initial: 100 Γ 49 = 4,900 IPs
- Full capacity: 100 Γ 128 = 12,800 IPs
- Pods: 100 Γ 110 = 11,000 pods
β Your Subnet Capacity Assessment
Per Subnet (each /20):
Total Capacity (all 3 subnets):
π― Your Configuration is EXCELLENT! β
Why Your Setup Works Well:
- β Large Subnets: /20 subnets are very generous
- β Multiple AZs: Distributes load across 3 availability zones
- β Room to Grow: Can support ~30 nodes per subnet
- β Prefix Efficiency: /28 prefixes align well with your subnet size
π Real-World Example
Letβs say you have 2 nodes (current config):Node 1 in Subnet 1 (10.50.64.0/20):
Node 2 in Subnet 2 (10.50.112.0/20):
π Recommendations
β Youβre Good to Go!
Your current setup can comfortably support:- Short term: 2-10 nodes (your current plan)
- Medium term: 20-30 nodes per subnet
- Long term: Up to ~90 nodes total
Optional Optimizations:
If you want to be even more efficient, you could adjustWARM_PREFIX_TARGET:
π Summary
You have PLENTY of IP space! Your /20 subnets are well-sized for prefix delegation. With your current 2-node setup, youβre using less than 0.5% of your subnet capacity. Even scaling to 50+ nodes would still be comfortable.π Additional Resources
- AWS VPC CNI Prefix Delegation: https://docs.aws.amazon.com/eks/latest/userguide/cni-increase-ip-addresses.html
- ENI Limits by Instance Type: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html
- EKS Best Practices: https://aws.github.io/aws-eks-best-practices/
