day4: kube scheduler

Published: (December 10, 2025 at 10:12 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

The Kubernetes scheduler decides which node each pod should run on. It does not place the pods itself; instead, it records the target node for each pod. The Kubelet on the selected node is responsible for actually creating the pod.

Scheduler Phases

  1. Filtering (Fit Phase)
    The scheduler discards nodes that cannot host the pod, such as:

    • Nodes explicitly excluded by the pod’s specifications.
    • Nodes lacking sufficient CPU, memory, or other resources required by the pod.
  2. Scoring (Priority Phase)
    The remaining nodes are scored using one or more priority functions (e.g., on a scale of 1–10). The pod is scheduled onto the node with the highest score.

Customization

  • The scoring functions and their weights can be customized.
  • You can implement a custom scheduler by writing your own scoring logic.
  • Common determinants include:
    • Resource requests and limits
    • Taints and tolerations
    • Node selectors
    • Affinity/anti‑affinity rules

Installation

  1. Download the kube-scheduler binary from the Kubernetes release page.
  2. Extract the binary and place it in a suitable directory (e.g., /usr/local/bin).
  3. Run it as a service, specifying a scheduler configuration file (e.g., /etc/kubernetes/scheduler-config.yaml).
# Example: start kube-scheduler with a config file
kube-scheduler --config=/etc/kubernetes/scheduler-config.yaml

Viewing the Scheduler

  • As a static pod: When deployed with kubeadm, the scheduler runs as a pod in the kube-system namespace. Its manifest is located at /etc/kubernetes/manifests/kube-scheduler.yaml.
  • As a process: You can locate the running scheduler process with:
ps aux | grep kube-scheduler

Summary

The Kubernetes scheduler matches pods to the most suitable nodes based on filtering and scoring criteria. Its behavior can be tuned via built‑in policies or custom extensions, and it can be installed and inspected either as a static pod or a system service.

Back to Blog

Related posts

Read more »

day5: kubelet

Overview Kubelet acts like the captain of a ship in the Kubernetes analogy. It requests the paperwork needed to join the cluster, serves as the sole point of c...

day3: kube controller manager

Overview The Kube Controller Manager runs the various controllers that continuously monitor the state of components in a Kubernetes cluster and work to bring t...