feat: Add max pods calculations to VPC limits using EKS AMI methodology#619
Open
randiskull wants to merge 1 commit intoaws:masterfrom
Open
feat: Add max pods calculations to VPC limits using EKS AMI methodology#619randiskull wants to merge 1 commit intoaws:masterfrom
randiskull wants to merge 1 commit intoaws:masterfrom
Conversation
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,
Contributor
|
Can you please add user story where this extra fields are used and where this will be consumed? |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Implementation:
Benefits for users:
Impact:
Documentation:
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.