When I create an EKS cluster I see that worker nodes have two ENIs, eth0 and eth1.
Does EKS require two ENIs for its functionality ? Or two ENIs are added to provide more IPs for the pods (using default AWS CNI) ?
The subnets must each have at least six IP addresses for use by Amazon EKS. However, we recommend at least 16 IP addresses.
Most managed Kubernetes services even impose hard limits on the number of pods per node: On Amazon Elastic Kubernetes Service (EKS), the maximum number of pods per node depends on the node type and ranges from 4 to 737.
The Amazon EKS control plane consists of control plane nodes that run the Kubernetes software, such as etcd and the Kubernetes API server. The control plane runs in an account managed by AWS, and the Kubernetes API is exposed via the Amazon EKS endpoint associated with your cluster.
CoreDNS version 1.8. 0 is the recommended version for Amazon EKS 1.19 clusters. This version is installed by default in new Amazon EKS 1.19 clusters. For more information, see Managing the CoreDNS add-on.
By default EKS uses aws-vpc-cni-k8s
to allocate IP addresses for pods. The default settings for the CNI plugin is WARM_ENI_TARGET=1
which will ensure you have an additional ENI available for future assignment. Your addresses will be assigned to the first ENI until the max IPs per ENI for the instance type is exhausted, then allocations will come from the second ENI. Once an IP address is assigned to the second ENI a third ENI will be allocated according to the WARM_ENI_TARGET
setting. It will continue to allocate additional ENIs as you use addresses until you reach the maximum number of ENIs for the instance type.
The other reason for the second ENI is so that you can you can use secondary CIDRS attached to your VPC. This allowed specific IP planning with a set of IP addresses just for the PODS. When a t3.small gets 11 IPs and a M5.2xlarge gets 58 IPs, you have to plan the subnets.
Review the docs: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With