Use it for node-level agents, or when a node is missing its agent pod.
DaemonSets
A DaemonSet runs one pod on every (selected) node — for log agents, monitoring, CNI and storage node plugins.
1. kubectl get ds -A — desired vs ready.
2. Missing node → taints/nodeSelector/affinity.
3. Pod failing on one node → describe it.
4. Update strategy RollingUpdate.
5. Resource requests fit every node.
DaemonSet → one pod per eligible node
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
kubectl get ds -AVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Compare the desired count with the number of eligible nodes. For missing nodes, check taints and node selectors. Confirm resource requests fit on small nodes.
Step 2 Common failures Narrow the fault
Control-plane nodes are tainted, so agents meant for them need a toleration. A large resource request leaves the Pod Pending on small nodes. Host-network DaemonSets conflict when two use the same port.
Tolerations are needed to run on tainted nodes (control plane). Desired vs ready counts show missing nodes.
kubectl get ds -A— first check for this topickubectl get pods -o wide— pods, status, node, IPkubectl describe pod <pod>— events and conditionskubectl logs <pod> [-c <c>] [--previous]— container logs (incl. previous crash)kubectl get events --sort-by=.lastTimestamp— recent cluster events
ReferenceWhat it is1 section · depth on demand
How it works
The DaemonSet controller creates one Pod per eligible node and sets node affinity so the scheduler places it there. Rolling updates replace Pods node by node according to maxUnavailable.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
A DaemonSet runs one Pod on every node that matches its node selector and affinity, and adds or removes Pods as nodes join and leave. The DaemonSet controller sets node affinity for each Pod and the default scheduler places it.
Automatic tolerations
DaemonSet Pods get tolerations for node.kubernetes.io/not-ready, unreachable, disk-pressure, memory-pressure, pid-pressure and unschedulable, so node agents keep running on unhealthy nodes. Tolerations for custom taints (for example node-role.kubernetes.io/control-plane:NoSchedule) must be added explicitly.
Reading the status counters
kubectl -n logging get ds fluent-bit
# DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR
# 6 6 5 6 5 <none>
kubectl -n logging get pods -l app=fluent-bit -o wide | grep -v Running
| Gap | Meaning |
|---|---|
| DESIRED lower than node count | Selector, affinity or taints exclude some nodes |
| CURRENT < DESIRED | Pods not created — check events on the DaemonSet |
| READY < CURRENT | Pods exist but are not ready — check that node's Pod |
| UP-TO-DATE < DESIRED | Rolling update still in progress |
Rolling updates
updateStrategy.rollingUpdate.maxUnavailable (default 1) controls how many nodes lose their agent at once. For CNI or storage node plugins keep it at 1, and use maxSurge (with maxUnavailable: 0) when the agent can run two copies side by side, so a node never runs without it.
Common mistakes
- DaemonSets without tolerations for tainted nodes.
ReferenceConfiguration & state1 section · depth on demand
Uses and commands
Typical DaemonSets: CNI agents, kube-proxy, log shippers (Fluent Bit), node-exporter, security agents.
kubectl get ds -A
kubectl rollout status ds/fluent-bit -n logging
Add tolerations so they also run on control-plane or tainted nodes when needed; use nodeSelector/affinity to limit them to some nodes.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.