Managed Kubernetes such as AWS EKS come with their own limitations.
One such limitation is how many PODs a Worker node can have based on the type of EC2 instance
For example,
- t3.medium can have only 17 pods
- t3.large can have 35 pods
These limitations are there for operational reasons.
To be more precise let us take the t3.medium instance, It can have only 3 network interfaces and 6 IPv4 addresses per each network interface
With a simple formula given below, you can calculate how many pods can t3.medium support.
We also have made a tool which can help you find the max pods for all supported EC2 instances
How to calculate the Maximum Number of pods supported by the Ec2 instance
here is the formula that can help.
- The first IP on each ENI is not used for pods
- +2 for the pods that use host networking (AWS CNI and kube-proxy)
# of ENI * (# of IPv4 per ENI - 1) + 2
It's not always easy to go and do the math before scheduling every time.
Pods per EC2 instance - Max Pods Calculator
I have created this tool that does the math for you and it updates automatically every week.
This is created using EC2 API and a GOlang project named MaxPodEKS which I will release it open source soon
Hope it helps.
Cheers
Sarav AK
More from Middleware Inventory
-
AWS EKS Load Balancer from Kubernetes Service | Devops JunctionIn this article, we are going to see how to create internal and external load balancers using the Kubernetes service on EKS When we think about making an application or deployment available externally or internally over a Domain name We think of Kubernetes Ingress but that's not the only way to…
-
AWS change instance type - From Console or AWS CLIHow to Change AWS Instance Type or EC2 instance type is more interesting and frequently asked question by many AWS Professionals. We create EC2 instances as t2, t3.micro but soon we realize that our requirements just got bigger for good and we need more CPU and RAM on our instance.…
-
AWS CLI List EFS Filesystem sort by SizeIn this post we are going to see an aws cli command to list elastic file systems sorted by Size in ascending or descending order. While am sharing all the new tricks in AWS CLI I come across. this is something I have learnt recently There is a dedicated post…
-
Find Who owns the Private IP in AWS | DevOps JunctionAt times of troubleshooting an issue or doing a forensic on a security incident in your AWS account. Finding who owns Private IP plays a major role. Do you know Almost all the AWS resources like Load Balancers, RDS, EFS has their own private IP address. So how to find…
-
How to Get Images of all PODs and DeploymentsLet's say you have two similar namespaces in your Kuberentes cluster and you want to compare the images of pods running on both these name spaces. Or Simply want to know what images are being used across the pods (or) deployments in your namespace Of course we are going to…