Can we control the k8s node run container members?

3/2/2016

Can we control the cluster node run a mount of container? Example:A node can run max container 5,if we rc has 6,at this node we just can start 5 container.

-- david guo
docker
kubernetes

2 Answers

3/3/2016

In each node:

vi /etc/kubernetes/kubelet
update KUBELET_ARGS="" to KUBELET_ARGS="--max-pods=10

"

restart your kubeclt

-- david guo
Source: StackOverflow

3/2/2016

The number of pods allowed per node can be customized via a kubelet flag. So if you really wanted to control it on a node-by-node basis, you could start each kubelet with a different flag value.

In practice, it is probably better to use resource requests and limits to help the scheduler place an appropriate number of pods on each machine.

-- Robert Bailey
Source: StackOverflow