Kubernetes: What if the pod limit crosses 110?

Arun Prakash
3 min readSep 27, 2022

Ever seen more than 110 pods sitting in a single node in the Kubernetes cluster?

Yes? Cool, Then I'm really looking forward to hearing from you in the comments.

Usually, when we talk about the limit for pods in a Kubernetes cluster, the default allowed maximum is 110. If you surpass that, you will not be able to create any new pods, You will just happen to to see some container-creating error.

How to increase the default pod limit?

If you ever want to increase the pods limit, then you can do it by passing the required pod limit by passing it to the field max-pods in the Kubernetes configuration file.

Example : $KUBELET_EXTRA_ARGS — max-pods=245

Why official default limit is 110?

How they came up with the number?

How far we can manually adjust the limit, and what could be the impact of that?

In Kubernetes, Each node is assigned a range of IP Addresses, a CIDR Block and thus each pod gets its unique IP address. Here, The size of the CIDR Block is very significant, as it indirectly points to the maximum number of pods that could be allowed in a node. Let me explain!

When the default maximum of 110 pods per node comes into the picture, Kubernetes assigns a /24 CIDR block to each node. That is, 256 addresses are allocated to the node under /24 CIDR Block.

It's always recommended to have an approximation of twice as many IP addresses as the available number of pods in the node. This is to address a seamless IP address mitigation when a pod gets added/removed. Now does it make sense ? 110 Pods and 256 IPS. Sounds perfect, right?

Still, If you want to manually change the number of allowed pods, You can go to the extent of 256 assuming each pod gets one unique IP address. That is, 256 pods get 256 IP address, which is the maximum budget for the default /24 CIDR !!

To make it simple,

We have a default limit of 110 to address a seamless IP address mitigation during pod addition/removal. 110 Pods and a double the number of available IP.

We can extend the pod limit manually to the extent of 256 under default CIDR /24 considering the fact, you are in a tight situation where you have one IP address per one pod.

And finally, Is it possible to change the CIDR Block configuration from the default /24? Of course, yes !!

If you do not configure the maximum number of pods per node, default CIDR /24 is used. In that case, each node gets a 256 IP address

If you configure the maximum number of pods per node, then depending upon the number, respective relevant Subnet CIDR can be used.

Example:

/27 CIDR has 32 services per subnet

/26 CIDR has 64 services per subnet

/24 CIDR, which has 256 services per subnet

--

--