Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

DaemonSets

Direct answer

A DaemonSet runs one pod on every (selected) node — for log agents, monitoring, CNI and storage node plugins.

When to use this

Use it for node-level agents, or when a node is missing its agent pod.

First 30 seconds

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.

Operational verification

DaemonSet → one pod per eligible node

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms
Key commandkubectl get ds -A
Scope / prerequisiteUse it for node-level agents, or when a node is missing its agent pod.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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.

Key points

Tolerations are needed to run on tainted nodes (control plane). Desired vs ready counts show missing nodes.

Key checks
  • kubectl get ds -A — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl 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
GapMeaning
DESIRED lower than node countSelector, affinity or taints exclude some nodes
CURRENT < DESIREDPods not created — check events on the DaemonSet
READY < CURRENTPods exist but are not ready — check that node's Pod
UP-TO-DATE < DESIREDRolling 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches 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
Terminology layer

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.

Aliases that resolve here
daemonsetskubernetes daemonsetdaemonset tolerations
Confirmation

Confirm action

Continue?