The scheduler is the control plane component responsible for determining which pods should run on which nodes. The default scheduler is kube-scheduler, though it's possible to both run additional schedulers alongside it (or entirely replace it).

Each scheduler watches the API server for changes to pods. Any pods missing nodeName are due to be scheduled, and those with a schedulerName property value matching this scheduler are relevant for the scheduler. A node is selected, the node name is set, and the Kubelet on the name will pick up from here.

Node selection

At a high level, node selection is comprised of three stages:

  • Filtering removes nodes that aren't able to run the pod based on its resource requests and node selector.
  • Scoring evaluates the most appropriate nodes according to node affinity and policy.
  • Binding breaks ties created by the scoring process and updates the pod API object with a nodeName.