Interactive LabRuns in your browser

Kubernetes Scheduler & Controller

Simulate Kube-Scheduler filter/score phases and Deployment reconciliation loops.

Speed:
A Deployment wants 3 replicas. The controller keeps actual = desired; the scheduler picks a node for each new pod.
Desired: 3Running: 3Pending: 0
node-aReady
CPU (m)500/2000
Mem (Mi)512/4096
node-bReady
CPU (m)1000/4000
Mem (Mi)1024/8192
node-cReady
CPU (m)0/1000
Mem (Mi)0/2048

Click a pod to kill it, fail a node, change replicas or pod size, and watch the controller and scheduler respond.

About this tool

Kubernetes is built on control loops. You declare a desired state — “run 3 replicas of this pod, each requesting 500m CPU and 512Mi memory” — and controllers keep comparing it with the actual state and acting on the difference. When a new pod needs a home, the scheduler filters out nodes that cannot run it and scores the rest to pick the best one.

This lab simulates a Deployment on a three-node cluster. Kill pods, fail and recover nodes, change the replica count or pod size, and watch the controller reconcile step by step while the scheduler shows each node’s filter result and LeastAllocated score.

How to use Kubernetes Scheduler & Controller

  1. Watch the initial reconcile: three pods are created and spread across nodes by score.
  2. Click a pod to kill it. The controller sees 2 of 3 replicas and creates a replacement.
  3. Fail a node: its pods are evicted and rescheduled on the remaining Ready nodes.
  4. Raise the replicas or the pod requests until nothing fits, and see pods stay Pending with the exact reason, such as “Insufficient cpu”.

Examples

Filter phase

Input
Pod requests 1000m CPU; node-2 has 600m free
Result
node-2 is filtered out: Insufficient cpu (1000m > 600m free)

Score phase

Input
node-1 50% used, node-3 20% used after placement
Result
LeastAllocated scores node-3 higher, so the pod is bound to node-3

Scheduling in two phases

  • Filter (predicates): drop nodes that are NotReady, lack CPU or memory for the pod’s requests, or violate taints, node selectors and affinity rules.
  • Score (priorities): rank the survivors, e.g. LeastAllocated prefers emptier nodes to spread load, MostAllocated packs pods tightly to free whole nodes.
  • Bind: the scheduler writes the chosen node into the pod; the kubelet on that node starts the containers.

Requests are what count

The scheduler places pods by their resource requests, not by actual usage. A node can look idle in monitoring yet reject new pods because its requests are fully reserved. Limits cap what a running container may use, but they do not affect placement.

Frequently asked questions

Everything you need to know about this tool and data security.

Why does a killed pod come back with a different name?

Pods are disposable. The ReplicaSet controller does not restart the old pod; it creates a new one from the template to restore the replica count.

How quickly are pods moved off a failed node?

In a real cluster the node is marked NotReady after missed heartbeats (about 40 seconds by default) and pods are evicted after a toleration period (300 seconds by default). The lab compresses this into a single step.

What does Pending mean?

The pod exists but has not been bound to a node. kubectl describe pod shows the scheduler’s reason, for example “0/3 nodes are available: 3 Insufficient memory”.

Is my data safe when using this tool?

Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.