Key takeaway
- How the Kubernetes scheduler filters, scores and binds Pods, what replaced policies, and when to use profiles, extenders or a second scheduler.
What is the Kubernetes scheduler and what does it decide?
The Kubernetes scheduler (kube-scheduler) watches for newly created Pods that have no node assigned and picks the best node for each one, so that the kubelet can run it. It first filters out nodes that cannot run the Pod, then scores the rest and binds the Pod to the winner. If several nodes tie, it picks one of them at random (Kubernetes documentation).
For enterprise platform teams the useful question is not how to write a scheduler, but when the default one is enough. Most teams should tune it with scheduling profiles and plugins, and only run a second scheduler when a workload needs placement rules the default cannot express. For how the scheduler fits with the API server, etcd and kubelet, see our guide to Kubernetes architecture and components.
What happens between creating a Pod and starting its containers?
The scheduling lifecycle has five steps:
- The Pod is created and its desired state is saved to etcd with the node name left empty.
- The scheduler notices a new Pod with no node bound.
- The scheduler finds the best node that fits the Pod.
- The scheduler tells the API server, which binds the Pod to the node and records the decision in etcd.
- The kubelet on that node watches for bound Pods through the API server and starts the containers.
The scheduler does one job only. It chooses a node and reports the choice. Starting containers is the kubelet's work.
How is the scheduler different from a controller?
| Scheduler | Controller | |
|---|---|---|
| What it does | Chooses a node for each Pod that has none | Runs a control loop that moves the current state of the cluster towards the desired state |
| Acts on | Unbound Pods | Resources such as Jobs and ReplicaSets |
| Output | A binding of Pod to node, sent through the API server | Requests to the API server to create, change or remove objects |
| Example | kube-scheduler | Job controller: tells the API server to create or remove Pods, then marks the Job finished |
The Kubernetes documentation describes a controller as a non-terminating loop that regulates the state of a system, and notes that the Job controller does not run containers itself; it asks the API server to create or remove Pods (controllers). Custom controllers are the basis of the Kubernetes operator pattern.
How does the scheduler filter and score nodes today?
The older Scheduling Policy, which let you list predicates (filters) and priorities (scores), has been unsupported since Kubernetes v1.23. Its flags (policy-config-file, policy-configmap, policy-configmap-namespace and use-legacy-policy-config) are no longer supported, and the documentation points to the scheduler configuration instead (Kubernetes scheduling policies page). Names such as PodFitsResources or LeastRequestedPriority are therefore history; today the same work is done by plugins.
The scheduling framework, stable since v1.19, is a plugin architecture compiled into the scheduler. A scheduling profile, stable since v1.25, decides which plugins run at each extension point (scheduler configuration). The documented default plugins include NodeResourcesFit, NodeAffinity, TaintToleration, PodTopologySpread, InterPodAffinity, VolumeBinding, DefaultPreemption and DefaultBinder.
Which extension points can you hook into?
The scheduling framework lists these extension points:
| Extension point | What it does |
|---|---|
| PreEnqueue | Runs before a Pod enters the active queue |
| QueueSort | Orders Pods in the scheduling queue; only one queue sort plugin can be enabled |
| PreFilter and Filter | Check conditions, then remove nodes that cannot run the Pod |
| PostFilter | Runs only when no node is feasible; preemption is the typical example |
| PreScore and Score | Rank the feasible nodes using weighted scores |
| Reserve and Permit | Reserve resources, then approve, deny or delay binding with a timeout |
| PreBind, Bind and PostBind | Do required work such as provisioning a volume, bind the Pod, then clean up |
How do you choose between ways to customise scheduling?
| Option | When it fits | Status and trade-off |
|---|---|---|
| Built-in constraints: nodeSelector, node affinity, taints and tolerations, topology spread | Most placement needs | No new component to run. The documentation warns that inter-pod affinity and anti-affinity need substantial processing and are not recommended in clusters of more than several hundred nodes |
| Scheduling profiles and framework plugins | You need different weights or plugins for different workloads | Stable configuration API. One kube-scheduler can run several profiles; each Pod selects one with schedulerName |
| Scheduler extender | You want filter, prioritise or bind logic in an external service, in any language | The Extender type in the v1 configuration API has urlPrefix, filterVerb, prioritizeVerb and bindVerb fields. It adds a network call to each decision |
| Second scheduler | A workload class needs its own placement logic | Pods pick it with schedulerName. Two schedulers can contend for the same nodes, and you own its upgrades and high availability |
| Fork and recompile kube-scheduler | Rarely | Not recommended: you must merge every upstream change yourself |
Profiles share one queue, so every profile must use the same queueSort plugin. Pods that set no schedulerName use default-scheduler, so that profile should exist. The task guide for configuring multiple schedulers shows the steps.

How do you build a custom scheduler with an extender?
- Write a configuration file for kube-scheduler that lists the extender, with its URL prefix and the verbs it serves. A local file works, depending on how the scheduler is deployed.
- Run an HTTP service in any language that answers the filter and prioritise calls.
- In the filter handler, loop over the candidate nodes and return only the ones you approve.
- In the prioritise handler, return a score for each node.
- Test with a few Pods, then check that the scheduler's own logs show the extender being called.
A scheduler written from scratch follows the same loop: watch for unbound Pods through the API server, apply your logic to choose a node, then send the binding request to the API server.
How do Pods spread across several clusters?
Kubernetes itself schedules within one cluster. Multi-cluster schedulers are separate systems, usually built from controllers, that decide which cluster receives a workload. One open-source approach uses a virtual kubelet provider to represent remote clusters, so a Pod chosen for a remote cluster is mirrored by a delegate Pod there. Use this only when you have a real reason, such as data residency, failure isolation or capacity limits. A single cluster needs only one copy of its shared services and is simpler to run.
What should governance and cost teams ask about scheduling?
- Who may change scheduler configuration, and is each change reviewed and versioned like application code?
- Are priority and preemption rules written down, so critical workloads do not evict each other by surprise?
- Can you explain why a Pod landed on a node? Keep scheduler logs and events long enough to answer audit questions.
- Does a second scheduler have its own high availability, monitoring and upgrade path?
- Does placement of costly nodes, such as GPU nodes, follow a written policy?
As teams hand more infrastructure decisions to AI agents, the same questions apply to those agents. ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control, and AgentGRC keeps autonomous agent actions inside policy, with the audit trail risk teams need. For packaging workloads before they are scheduled, see Helm for Kubernetes.
When should you not write a custom scheduler?
- When node affinity, taints, topology spread or a profile change would do the job.
- When you cannot staff the on-call and upgrade work for an extra control plane component.
- When the placement logic needs live data that the extender cannot fetch within the scheduling latency you accept.
Start with built-in constraints, move to profiles, add an extender only for logic the plugins cannot express, and run a second scheduler last.
To map one decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
Which component assigns Pods to nodes in Kubernetes?
The kube-scheduler. It watches for Pods with no node, filters out nodes that cannot run them, scores the rest and binds the Pod through the API server.
What replaced scheduler predicates and priorities?
Scheduling Policy has been unsupported since Kubernetes v1.23. Use the scheduler configuration, where scheduling profiles enable plugins at each extension point.
Can I run more than one scheduler in a cluster?
Yes. You can run a second scheduler, or define several profiles in one kube-scheduler, and each Pod selects one with schedulerName. Pods that set none use default-scheduler.
What is the difference between a scheduler and a controller?
The scheduler chooses a node for Pods that have none. A controller runs a control loop that moves the current state of resources towards the desired state.
When is a scheduler extender worth using?
When you need filter, prioritise or bind logic in an external service and the built-in constraints and plugins cannot express it. Expect an extra network call per decision.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE