World map

 

BM: Baca dalam Bahasa Melayu

World K2: Trays & Orders

DaemonSets: one per stall

You will learn: how a DaemonSet runs one pod on every node, and why it skips some nodes.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

Every stall needs exactly one cleaner. When a new stall opens, it needs one too. Can a Deployment with replicas: 3 promise that?

Pick one answer.

Watch

You are here: cluster kind-dev namespace default
The DaemonSet sweeper makes one pod on dev-worker and one on dev-worker2. Terminal output: $ kubectl apply -f sweeper.yaml daemonset.apps/sweeper created $ kubectl rollout status daemonset/sweeper --timeout=120s Waiting for daemon set "sweeper" rollout to finish: 0 of 2 updated pods are available... daemon set "sweeper" successfully rolled out $ kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES sweeper-sp7t8 1/1 Running 0 2s 10.244.1.3 dev-worker <none> <none> sweeper-xvwnn 1/1 Running 0 2s 10.244.2.3 dev-worker2 <none> <none>

A DaemonSet: One tray on every stall, like a cleaner per stall. New stall, new tray. puts one tray on every stall. Look at the NODE column: one sweeper per worker. A new stall gets its own sweeper by itself.

Predict

This cluster has 3 nodes. Why are there only 2 sweepers?

Pick one answer.

Try it

Your turn. Apply sweeper.yaml. Then run kubectl get daemonset sweeper. DESIRED should say 2.

You are here: cluster kind-dev namespace default
Stalls: 3. Trays: 0 (0 ready). Waiting for a stall: 0.
dev-control-planeOpenManager

No trays here.

dev-workerOpen

No trays here.

dev-worker2Open

No trays here.

Time: +0s (sped up)

Try it

A DaemonSet has no replicas. The number of stalls decides. Read the real error, then fix the file.

Fix the manifest, then press Apply.

sweeper.yaml18 lines

Check

Deployment or DaemonSet? Sort each job.

Drag a card into a box. Or tap the card, then tap the box.

      You did it!

      You can now run one pod on every node with a DaemonSet.

      Go deeper (optional)

      In a kind cluster, kube-proxy and kindnet are DaemonSets in kube-system. They carry a toleration, so they run on the control plane too. A nodeSelector limits a DaemonSet to some stalls only.

      Real rep (optional): on a throwaway cluster, run kubectl get daemonsets -n kube-system.