惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

Devoriales - DevOps and Python Tutorials

Cloud & DevOps & AI Digest: The Week of Jun 28, 2026 Cloud & DevOps & AI Digest: The Week of Jun 20, 2026 Ansible for DevOps Engineers: Architecture, Core Concepts, and Hands-On Lab Login Must-Have Kubernetes CLI Tools Every Platform Engineer Should Know Login Login Login Why Your Best Engineers Are Quitting (And How to Stop It) Login ArgoCD Vulnerability: How the ServerSideDiff Feature Exposes Kubernetes Secrets Login How Kubernetes Controls What Your Containers Can Do Login Multi-AZ Is Not Disaster Recovery: What the AWS Bahrain Outage Finally Proved Trivy Supply Chain Attack: When Your Security Scanner Becomes the Threat Is Claude Opus 4.6 Fast Mode Really Worth 6× the Price? Login AWS Regional NAT Gateway: What It Is and Why You Should Care Kubernetes 1.35 Timbernetes Release AWS re:Invent 2025: The Future of Kubernetes on EKS Debate Series: How Do We Control Deployment Order in Kubernetes? Debate Series: Should We Eliminate Kubernetes Secrets Entirely? Kubernetes CRDs Explained: A Beginner-Friendly Guide to Extending the Kubernetes API Reduce Cloud Cross-Zone Data Transfer Costs with Kubernetes 1.33 trafficDistribution Building Custom Bitnami Images: A Guide for Self-Hosted Container Images New Features in Kubernetes 1.34: An Overview From Free to Fee: How Broadcom's Bitnami Monetization Disrupts DevOps Infrastructure Claude Code Cheat Sheet: The Reference Guide Kubernetes Loses Enterprise Slack Status: Discord Among Platforms Being Considered Understanding Container Security: A Guide to Docker and Pod Security Container Patterns in Kubernetes: Init Containers, Sidecars, and Co-located Containers Explained AWS Launches Serverless MCP Server: AI-Powered Development Gets a Serverless Boost Valve Responds to Alleged Steam Data Breach Reports: What Users Need to Know ArgoCD 3.0: The Evolution Toward Secure GitOps Redis Returns to Open Source: The AGPLv3 Licensing Decision New Features in Kubernetes 1.33: An Overview Prometheus: How We Slashed Memory Usage IngressNightmare: Critical Ingress-NGINX Vulnerabilities and How to Check Your Exposure New Features in Kubernetes 1.32: An Overview What to Consider If You're Not Signing Up for Bitnami Premium Certified Kubernetes Administrator (CKA) Exam Updates for 2025 DeepSeek AI and the Question of the AI Bubble Python Tops the Tiobe Index: The Most Popular Programming Languages - January 2025 2024 in Review: IT Trends, Startups, and What’s Next Inside Argo: The Open-Source Journey Captured in a CNCF Documentary Running Docker on macOS Without Docker Desktop - updated with Kubernetes installation HashiCorp Rolls Out Terraform 2.0 at HashiConf, Keeps IBM Acquisition in the Shadows Is the EU Falling Behind in the Global AI Race? Prometheus Essentials: Node Exporter And System Monitoring Prometheus Essentials: Install and Start Monitoring Your App Prometheus Essentials: Introduction To Metric Types Kubernetes Pod Scheduling Explained: Taints, Tolerations, and Node Affinity Retrieval Augmented Generation (RAG) Explained for Beginners Like Me Using Sealed Secrets with Your Kubernetes Applications
Unlocking Higher Pod Density in EKS with Prefix Delegation
Aleksandro Matejic · 2025-12-24 · via Devoriales - DevOps and Python Tutorials

Running Amazon EKS at a larger scale can lead to issues with IP address limits, which affects how many pods can run on a node. This happens because EKS uses EC2 network interfaces that have fixed IP limits.

Prefix Delegation is a feature in the AWS VPC CNI plugin that helps address this by allowing more pods to run on each node. In this post, we’ll explain what Prefix Delegation is, how it works, how to enable it, and the benefits it provides.

Why Prefix Delegation?


In a traditional EKS setup, each pod gets a single secondary IP. That works fine—until your workloads scale, and suddenly your node is out of IPs before it’s out of CPU or memory.

In the following example, we'll use m5.large instance type that has 3 ENIs and 10 IP addresses per network interface.

❗The number of ENIs and IP addresses per interface differes between different EC2 instance types. You can find the specs for each EC2 type here

Let’s break it down with a familiar EC2 instance, like m5.large:

  • Without Prefix Delegation (Traditional):

    • 3 ENIs × 10 secondary IPs = 30 pod IPs (minus 1 for the node) → ~29 pods

❗You will not get 3 ENIs from the beginning. AWS will increase the number of ENIs when you try to spin up more pods.

  • With Prefix Delegation:

    • 3 ENIs × 9 prefixes × 16 IPs = 432 theoretical IPs → capped by Kubernetes at 110 pods

Every Elastic Network Interface (ENI) must have a Primary Private IPv4 Address to function on the network. This IP identifies the EC2 instance itself.

So instead of being bottlenecked at 29 pods per node, you hit the standard Kubernetes maximum of 110 pods per node—without changing instance type or networking configuration.

How Prefix Delegation Works


Prefix Delegation switches the unit of IP assignment from individual IPs to /28 IPv4 prefixes (each containing 16 IP addresses).

Here’s how the lifecycle works inside EKS:

  1. aws-node DaemonSet requests /28 prefixes from your subnet

  2. AWS assigns those prefixes to the node’s ENIs

  3. The VPC CNI allocates pod IPs from the assigned prefixes

  4. A “warm” pool of unused prefixes is maintained for faster scheduling

Key Configurations

To enable Prefix Delegation in your cluster, set the following environment variables in the aws-node DaemonSet:

- name: ENABLE_PREFIX_DELEGATION
  value: "true"
- name: WARM_PREFIX_TARGET
  value: "1"

For instance, if you deploy your EKS and the aws-node addon with AWS CDK, you could add it to your configuration like the following:

    new eks.Addon(this, 'AwsVpcCniAddon', {
      cluster: this.cluster,
      addonName: 'vpc-cni',
      addonVersion: 'v1.21.1-eksbuild.1',
      preserveOnDelete: false,
      configurationValues: {
        env: {
          ENABLE_PREFIX_DELEGATION: 'true',
      },
    });

Setting WARM_PREFIX_TARGET=1 creates a 'buffer' of ready-to-use IP addresses on each node. 1 is the default value.

From the official doc: "The installation manifest’s default value for WARM_PREFIX_TARGET is 1. In most cases, the recommended value of 1 for WARM_PREFIX_TARGET will provide a good mix of fast pod launch times while minimizing unused IP addresses assigned to the instance."

Specifically, it ensures that one full block of 16 IPs (a /28 prefix) is always attached and on standby, even if it's not currently being used. When your application scales up and needs to launch new Pods, they can grab an IP from this 'warm' pool instantly instead of waiting for the network interface to attach. This eliminates the 'startup lag' during traffic spikes while preventing us from hoarding too many unused IP addresses.

You can technically set the WARM_PREFIX_TARGET value to whatever number you like, but the physical limit on an m5.large instance is 27 prefixes.

Here is the breakdown of why 27 is the hard ceiling and how the setting behaves:

An m5.large instance has 3 ENIs, and each ENI has 10 slots:

  • Slot 0: Occupied by the ENI's Primary IP (Required).

  • Slots 1-9: Available for Prefixes.

Total Capacity: 3 ENIs x 9 Prefixes = 27 Prefixes Total

It will only apply to the new node groups, so you need to recreate any node groups where you want Prefix Delegation to be enabled.

Real-World Pod Capacity Boost


After enabling Prefix Delegation, node pod counts look very different:

kubectl get nodes -o custom-columns=NAME:.metadata.name,TYPE:.metadata.labels.node\\.kubernetes\\.io/instance-type,PODS:.status.capacity.pods

Output:

NAME                                      TYPE       PODS
ip-10-0-2-22.eu-west-1.compute.internal   m5.large   110 <<<< PREFIX DELEGATION
ip-10-0-2-30.eu-west-1.compute.internal   m5.large   29
ip-10-0-2-81.eu-west-1.compute.internal   m5.large   29

This shows a clear improvement: older instance types cap out at 11–35 pods, while prefix-enabled nodes max out at 110 pods—the Kubernetes default.

Confirming Prefix Delegation is Active


Here are a few quick checks:

1. Check DaemonSet configuration

kubectl set env daemonset/aws-node -n kube-system --list | grep PREFIX

2. Look at the node capacity

kubectl get nodes -o custom-columns=NAME:.metadata.name,INSTANCE_TYPE:.metadata.labels.node\\.kubernetes\\.io/instance-type,ALLOCATABLE_PODS:.status.allocatable.pods

You should see ALLOCATABLE_PODS: 110 on prefix-enabled nodes.

3. Inspect EC2 ENIs

aws ec2 describe-network-interfaces --network-interface-ids <eni-id>

Look for Ipv4Prefixes instead of PrivateIpAddresses:

"Ipv4Prefixes": [
    { "Ipv4Prefix": "10.0.45.16/28" },
    { "Ipv4Prefix": "10.0.45.32/28" }
]

When Prefix Delegation is active, the ENI’s IP listing will show /28 CIDR blocks instead of individual IP addresses.

Cost and Scaling Benefits


Prefix Delegation doesn’t just boost pod capacity—it can dramatically reduce infrastructure cost and improve operational flexibility.

Instance Type

Without Prefix

With Prefix

Node Cost Reduction

t3.small

11 pods

110 pods

90% fewer nodes

m5.large

29 pods

110 pods

73% fewer nodes

Assuming you’re running an app that requires 400 pods:

  • Without Prefix Delegation: 400 / 29 = ~14 nodes

  • With Prefix Delegation: 400 / 110 = ~4 nodes

This is a ~70% savings on EC2 costs alone, not to mention:

  • Fewer EBS volumes

  • Lower NAT Gateway charges

  • Reduced log volume and monitoring overhead

  • Simpler IP planning

When (and Not) to Use Prefix Delegation


While Prefix Delegation is a powerful feature, it changes how your cluster consumes IP addresses. It is not always a "fire and forget" setting.

Use it if:

  • You have large subnets: Your subnets are /22 or larger, so you can afford to "spend" IPs in blocks of 16 without running out.

  • You use Custom Networking: You are using the AWS VPC CNI with Custom Networking (secondary CIDR blocks like 100.64.0.0/10). This gives you a massive separate pool of IPs just for pods, isolating them from your node IP space.

  • You need density: You are running high-density workloads (like small microservices or batch jobs) and hitting the ENI limit on your nodes.

⚠️ Be careful (or avoid) if:

  • You have small subnets: If you are running on standard /24 subnets (254 IPs), Prefix Delegation can exhaust your IP space extremely fast.

    • Why? Each node grabs a full /28 block (16 IPs) immediately. Launching just 10 nodes will consume 160 IPs instantly, leaving little room for error.

  • Legacy IP Constraints: Your organization has strict IP quotas or limited private IPv4 space.

💡Tip: If you are constrained by IP space but need high density, the architectural "fix" is to implement EKS Custom Networking using CGNAT ranges. This allows you to enable Prefix Delegation safely without exhausting your primary VPC subnets. You can read more about setting up Custom Networking in the AWS Best Practices guide.

Useful Commands


Check the IP Prefixes for a specific EC2 Instance (don't forget to set the INSTANCE_ID variable):

aws ec2 describe-network-interfaces \
  --region eu-west-1 \
  --filters "Name=attachment.instance-id,Values=$INSTANCE_ID" \
  --query 'NetworkInterfaces[*].[NetworkInterfaceId, Ipv4Prefixes[*].Ipv4Prefix]' \
  --output json

Final Thoughts


Prefix Delegation allows you to run 3–10× more pods on your existing nodes. This prevents you from paying for extra EC2 instances just to get more IP addresses, and potentially letting you fully use the CPU and memory you are paying for.

However, use it with caution.

Because this feature reserves IPs in blocks of 16 (rather than individual Secondary IPs), it consumes network space much faster.

Before enabling this, verify that your subnets have plenty of free space or set up secondary IP ranges to handle the load. If your network has the room, this is a great way to cut costs and maximize efficiency.

References


Prefix Mode for Linux: https://docs.aws.amazon.com/eks/latest/best-practices/prefix-mode-linux.html

EC2 general purpose instances:  https://docs.aws.amazon.com/ec2/latest/instancetypes/gp.html#gp_network

Custom Networking: https://docs.aws.amazon.com/eks/latest/best-practices/custom-networking.html

IPv6 addresses to clusters, Pods, and services:  https://docs.aws.amazon.com/eks/latest/userguide/cni-ipv6.html