what does kubernetes scheduler capacity check do or cover?

1/6/2019

Most of the kubernetes docs explained that Scheduler will check pod request/limit for resources and the capacity of all nodes among the cluster.

What about the resources costed on the processes running on the local nodes. Does the scheduler check both resources costed by all the kubernetes containers and THOSE LOCAL PROCESSES ON NODES?

In particular, what about if I run heavy computing processes on a kubernetes node, will the scheduler do for the capacity calculation, will it count the big chunk of memory and cpu costed by the local processes? And will it reject the new incoming pod or terminate existing pods due to the resources cost increasing by the local node needed?

-- Cross
kubernetes
scheduler

1 Answer

1/7/2019

Kubernetes scheduler checks only if there are available resources. But if you will run a huge consuming task on Kubernetes node, and you will run out of memory, then you will faced with OOM killer this will kill some processes to get some memory for the system.

With Kubernetes you can define the amount of resources for each node and the scheduler will look if it has any and then if it can schedule something, it will do it. Scheduler never allocates more then it exist on node.

If you will spend resources from node it will allocate less. If you already have almost all resources allocated, and then run a huge task on the node, then OOM killer will kill something. It might be any container daemon or task in system, and the scheduler will not spawn new pods on this node, until there are enough resources.

-- Nick Rak
Source: StackOverflow