Hands-on Lab·Certified Kubernetes Administrator
DaemonSets
A DaemonSet has no replica count. It runs exactly one Pod on every eligible node and adds one automatically when a node joins. Write one, get it onto the control plane with a toleration, and see why the CNI and kube-proxy are built this way.
Workloads Guide 29 of 103 Beginner
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 25 min
Pod name suffixes and addresses differ per run. Node names are this lab's.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when something has to run on every node - a log shipper, a metrics agent, a CNI. This matters because a DaemonSet has no replica count at all: the node list is the replica count, and it changes as nodes join and leave.
- writing a controller that has no
replicasfield to set - confirming placement really is one per node by checking against the node list
- reading logs from every node at once with
-land--prefix - finding the DaemonSets this cluster has been running since the day it was built
Before you start
- A cluster with more than one node, so "one per node" means something.
- The Deployments guide, or equivalent: a DaemonSet is the same controller idea with a different rule for how many Pods to run.
kubectlaccess. Everything here is removed at the end.
-
A controller with no replica count
-
Confirm it is really one per node
-
Read logs across every node at once
-
What the cluster already runs this way
-
Clean up