Skip to content

Conversation

@randiskull
Copy link

This enhancement adds pod capacity fields to the VPC limits file to help EKS users make informed decisions about instance sizing and networking configuration.

Issue #, if available:

Description of changes:
Changes:

  • Add MaxPodsSecondaryIPs: Pod capacity in default secondary IP mode
  • Add MaxPodsPrefixDelegation: Pod capacity with prefix delegation enabled
  • Add MaxPodsRecommended: AWS recommended limit accounting for CPU constraints
  • Add CPUCount: vCPU count to understand recommended limit calculations

Implementation:

  • Implements EKS AMI max-pods calculation formulas:
    • Secondary IP mode: ENIs x (IPs_per_ENI - 1) + 2
    • Prefix delegation: ENIs x ((IPs_per_ENI - 1) x 16) + 2
  • Applies CPU-based ceiling (110 for <=30 vCPUs, 250 for >30 vCPUs)
  • Handles non-Nitro instances correctly (fallback to secondary IP capacity)

Benefits for users:

  • Capacity planning: Understand pod density limits before deploying
  • Cost optimization: Choose right-sized instances based on actual pod capacity
  • Performance tuning: Respect recommended limits to avoid kubelet overload
  • Configuration decisions: Evaluate whether prefix delegation is worth enabling
  • Troubleshooting: Quickly identify if pod scheduling issues are IP-related

Impact:

  • Updates all 1000+ instance types with pod capacity information
  • Fixes 80 non-Nitro instances that previously showed 0 for prefix delegation
  • Maintains compatibility with Karpenter's weekly codegen workflow

Documentation:

  • Enhanced README with detailed field descriptions, formulas, and examples
  • Added Benefits for EKS Users section explaining practical value
  • Included complete example entry showing calculations for m5.4xlarge

Example entry (m5.4xlarge):
MaxPodsSecondaryIPs: 234, // 8 x (30-1) + 2 = 234
MaxPodsPrefixDelegation: 3714, // 8 x ((30-1) x 16) + 2 = 3,714
MaxPodsRecommended: 110, // min(3714, 110) due to 16 vCPUs
CPUCount: 16,

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This enhancement adds pod capacity fields to the VPC limits file to help EKS
users make informed decisions about instance sizing and networking configuration.

Changes:
- Add MaxPodsSecondaryIPs: Pod capacity in default secondary IP mode
- Add MaxPodsPrefixDelegation: Pod capacity with prefix delegation enabled
- Add MaxPodsRecommended: AWS recommended limit accounting for CPU constraints
- Add CPUCount: vCPU count to understand recommended limit calculations

Implementation:
- Implements EKS AMI max-pods calculation formulas:
  * Secondary IP mode: ENIs x (IPs_per_ENI - 1) + 2
  * Prefix delegation: ENIs x ((IPs_per_ENI - 1) x 16) + 2
- Applies CPU-based ceiling (110 for <=30 vCPUs, 250 for >30 vCPUs)
- Handles non-Nitro instances correctly (fallback to secondary IP capacity)

Benefits for users:
- Capacity planning: Understand pod density limits before deploying
- Cost optimization: Choose right-sized instances based on actual pod capacity
- Performance tuning: Respect recommended limits to avoid kubelet overload
- Configuration decisions: Evaluate whether prefix delegation is worth enabling
- Troubleshooting: Quickly identify if pod scheduling issues are IP-related

Impact:
- Updates all 1000+ instance types with pod capacity information
- Fixes 80 non-Nitro instances that previously showed 0 for prefix delegation
- Maintains compatibility with Karpenter's weekly codegen workflow

Documentation:
- Enhanced README with detailed field descriptions, formulas, and examples
- Added Benefits for EKS Users section explaining practical value
- Included complete example entry showing calculations for m5.4xlarge

Example entry (m5.4xlarge):
    MaxPodsSecondaryIPs:     234,   // 8 x (30-1) + 2 = 234
    MaxPodsPrefixDelegation: 3714,  // 8 x ((30-1) x 16) + 2 = 3,714
    MaxPodsRecommended:      110,   // min(3714, 110) due to 16 vCPUs
    CPUCount:                16,
@randiskull randiskull requested a review from a team as a code owner October 22, 2025 02:09
@yash97
Copy link
Contributor

yash97 commented Oct 22, 2025

Can you please add user story where this extra fields are used and where this will be consumed?

@randiskull
Copy link
Author

@yash97 this is related to #620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants