Imbalance of pods in Kubernetes


I have a general question about pod allocation based on node resources.

I have a 6 node cluster - 1 master and 5 workers. All of my workers have the same number of CPUs, but 1 of my workers has twice the memory. For some reason, while my 4 of my workers are running an average of 48-50 pods, my 1 worker with 2X memory is consistently running 75 pods, often overwhelming the node.

Is there any feature/capability in K8s 1.14.6 or lower, which allows me to better balance pods across nodes? I’d like to have it where all of my workers are running roughly 45-50 pods each.

Please let me know.


Cluster information:

Kubernetes version: 1.14.6
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: RHEL 7.x
CNI and version: kube-router 0.3.2
CRI and version: docker 1.13.1-74

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

There is a flag to the kubelet for the max number of pods to run in a node. I thought the default was 30? For sure you can use that.

In any case, if you sent the mem request of the pods correctly, the best way is to let kubernetes do the scheduling and you just “don’t care”. Don’t babysit them, if you can avoid it :slight_smile: