Bitzu

KCNA ยท Cluster administration and scheduling

How the scheduler places Pods

Filtering and scoring, binding, unschedulable Pods, role of kubelet after binding.

Key points

  • kube-scheduler watches for Pods without a node.
  • It filters out nodes that cannot satisfy the Pod (for example not enough free CPU for its requests), then scores the feasible ones and picks the best; ties are broken randomly.
  • It then binds the Pod by telling the API server the chosen node.
  • The kubelet on that node starts the containers.
  • If no node passes filtering, the Pod stays Pending.

Source: https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/

Practice questions

Single choice

What are the two main phases the scheduler runs for each unscheduled Pod?

  1. Pulling and running
  2. Filtering and scoring
  3. Cordoning and draining
  4. Scaling and tainting
Show answer

Answer: B. Filtering and scoring

Filtering removes infeasible nodes and scoring ranks the rest. Pulling and running are not scheduler phases.

Select all that apply

Which tasks belong to kube-scheduler?

  1. Filtering out nodes that cannot run the Pod
  2. Scoring the feasible nodes
  3. Pulling the container image on the node
  4. Telling the API server which node was chosen
  5. Starting the container processes
Show answer

Answer: A. Filtering out nodes that cannot run the Pod, B. Scoring the feasible nodes, D. Telling the API server which node was chosen

The scheduler filters nodes, scores feasible ones and reports its choice to the API server. Pulling images and starting containers are done by the kubelet and container runtime.

True or false

After choosing a node, kube-scheduler itself starts the containers on that node.

Show answer

Answer: False

False. The scheduler only records the decision (binding). The kubelet on the chosen node starts the containers.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More KCNA topics in this module