How to increase default pods in Kubernetes from 110 to 250?

12/13/2019

I have a situation where I need to run a different versions of a product in a single AWS instance. but to do that total pod no is exceeding 110. Kubernetes is not able to take so much pod by default.

Is there any way to increase default pod to 250 so that I can run all the versions on a single instance?

-- Niladri Dey
amazon-web-services
kubernetes
pod

1 Answer

12/13/2019

You can set the MaxPods field in the kubelet config file:

apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
MaxPods: 250

You can then supply the config file to the kubelet binary with the --config flag, for example:

kubelet --config my-kubelet-config.yaml

Alternatively, the kubelet binary also has a --max-pods flag that allows you to set the value directly. However, this flag is deprecated and the use of a config file, as shown above, is recommended. See the kubelet reference.

-- weibeld
Source: StackOverflow