what k8s take into account at the time to assing pods to a node?

3/17/2019

maybe is a obvious question , but I have not found a documentation about how k8s is assigning pods to a node , currently I have a cluster with 5 worker nodes , and 3 nodes are full with pods , and the other 2 don't , I know that I can set cpu, mem in the yaml for each container , but by default how does k8s work on it?

-- Esteban Ziths
kubernetes

1 Answer

4/19/2019

As per documentation link provided by @Amityo, the main concept assigning Pods to the Nodes in Kubernetes based on usage nodeSelector and Node affinity model, however you might also take a look at "Taints and Tolerations" representing quite similar approach but they allow Nodes to make decision whether Pods can be scheduled by matching some specific criteria with key:, value:, effect: toleration.

-- mk_sta
Source: StackOverflow