Which component in Kubernetes is responsible for resource allocation?

5/8/2019

After scheduling the pods in a node in Kubernetes, which component is responsible for sharing resources among the pods in that node?

-- HamiBU
kubernetes

2 Answers

5/8/2019

From https://kubernetes.io/docs/concepts/overview/components :

kube-scheduler - Component on the master that watches newly created pods that have no node assigned, and selects a node for them to run on.

Factors taken into account for scheduling decisions include individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference and deadlines.

After pod is scheduled node's kubelet is responsible for dealing with pod's requests and limits. Depending on pod's quality of service and node resource pressure pod can be evicted or restarted by kubelet.

-- Vasily Angapov
Source: StackOverflow

5/8/2019

After scheduling

That will be the OS kernel.

You can reserve/limit pod resources: https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-resource-requests-and-limits. Than it is passed from kubelet down to docker, then to cgroups, and finally to a kernel.

-- Max Lobur
Source: StackOverflow