The kube-scheduler component
The kube-scheduler
component is a control plane component. It should run on the master node.
This is a component that is responsible for electing a worker node out of those available to run a newly created pod.
The role of the kube-scheduler component
Similar to the Kubelet, kube-scheduler
queries the kube-apiserver
at regular intervals in order to list the pods that have not been scheduled. At creation, pods are not scheduled, which means that no worker node has been elected to run them. A pod that is not scheduled will be registered in Etcd
but without any worker node assigned to it. Therefore, no running Kubelet will ever be aware that this pod needs to get launched, and ultimately, no container described in the pod specification will ever run.
Internally, the pod object, as it is stored in Etcd
, has a property called nodeName
. As the name suggests, this property should contain the name of the worker node that will host the pod. When this...