IP Prefix in EKS CNI plugin

IP Prefix in EKS CNI plugin

In the last article we touch upon the IP prefix by an simple example with an apartment having multiple floors and rooms . In this article we will deep dive more in IP Prefixes by some of its unique features and explain with simple example again .

In this blog we will cover the below topics

a> What is IP Prefixes in EKS CNI ?

b> Why IP Prefixes in EKS CNI ?

c> How IP Prefixes assist when we horizontally scales pods in EKS cluster ?

d> Where IP prefixes got those IP ranges ?

d> What is ENI ?

e> ENI vs CNI

f> What is L-IPAM?

  • What is IP Prefixes ?

  1. An IP prefix is a range of IP addresses. Instead of assigning individual secondary IP addresses to nodes (Amazon EC2 instances), we assign IP prefixes to the nodes. Each prefix includes several IP addresses.

  • Why IP Prefixes in EKS CNI ? In EKS, the CNI plugin allocates IP addresses to Pods from the assigned prefixes. This ensures efficient IP address utilization and faster Pod startup. By using prefixes, we optimize IP address management and improve scalability.
  • In EKS, the CNI plugin allocates IP addresses to Pods from the assigned prefixes from a VPC CIDR range. This ensures efficient IP address utilization and faster Pod startup. By using prefixes, we optimize IP address management and improve scalability.
  • How IP Prefixes assist when we horizontally scales pods in EKS cluster ?

  1. When you horizontally scale Pods (add more Pods), IP prefixes play a crucial role in efficient IP address allocation.
  2. Each node (EC2) consists pool of IP prefixes ranges .
  3. These ranges responsible for available & assigned IP addresses to Pods .
  4. As you scale horizontally (add more Pods), the CNI plugin assigns IP addresses from the existing prefixes.
  5. By using IP prefixes, warm ENIs (Elastic Network Interfaces) and slots are pre-allocated.
  6. When a new Pod starts, it quickly receives an IP address from the warm pool.
  7. IP prefixes allow more Pods per node, improving resource utilization.
  8. You can achieve higher pod density without running out of IP addresses.

  • Where IP prefixes got those IP ranges ?

IP prefixes got those IP ranges from VPC CIDR range . when we create an EKS cluster ,the CNI plugin automatically allocates a pool of IP ranges prefixes from VPC CIDR to primary ENI of the node (EC2). Post that this prefixes assist to assign existing pods and scale IP address with HPA (Horizontal Pod Autoscaling )feature .

  • What is ENI ?

The ENI created when we spin up EKS cluster with the Node group (EC2) associate with this . The ENI act as network interface card associate with rules to allow security group and act as a firewall .

  • ENI vs CNI :-

  • What is L-IPAM?

L-IPAM stands for Local IP address management which a critical component within the CNI plugin in EKS . This ensures a warm pool of Secondary IP address to each node in your cluster .

  • How it works ?

  • When a new Pod is scheduled on a node, the Container Runtime invokes the CNI binary. The CNI binary then calls L-IPAM to allocate an IP address for the new Pod .

  • It pulls secondary IP addresses from the warm pool.
  • It assigns these secondary IP addresses to Pods running on the node.
  • By maintaining warm pool it ensures that IP address are readily available for efficient Pod networking . It acts as a Secondary IPV4 CIDR blocks which generates millions of additional IP addresses for pods to use .


In conclusion managing EKS cluster is a complex & tedious task for Devops Engineer & AWS Cloud Engineers but strengthening fundamentals will definitely assist you to a step further . Repost this if you found useful .




要查看或添加评论,请登录

社区洞察

其他会员也浏览了