DaemonSets ensure that a copy of a pod runs on all (or selected) nodes in the cluster. They are ideal for cluster-wide services like log collectors, monitoring agents, and storage daemons.Documentation Index
Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
Use this file to discover all available pages before exploring further.
Key Concepts
DaemonSet
Node Selector
Tolerations
Rolling Update
Required Permissions
| Action | Permission |
|---|---|
| View daemonsets | iam:project:infrastructure:kubernetes:read |
| Restart daemonset | iam:project:infrastructure:kubernetes:write |
| Create daemonset | iam:project:infrastructure:kubernetes:write |
| Edit daemonset | iam:project:infrastructure:kubernetes:write |
| Delete daemonset | iam:project:infrastructure:kubernetes:delete |
DaemonSet Status Values
| Status | Description |
|---|---|
| Running | All desired nodes have ready pods |
| Updating | Rolling update in progress |
| NotReady | Some pods are not ready yet |
| Misscheduled | Pods running on nodes that shouldn’t have them |
| NoNodes | No nodes match the DaemonSet’s node selector |
| Unknown | Status cannot be determined |
DaemonSet Metrics
| Metric | Description |
|---|---|
| Desired | Number of nodes that should run the pod |
| Current | Number of nodes running at least one pod |
| Ready | Number of nodes with ready pods (ready/desired) |
| Available | Number of nodes with available pods |
| Misscheduled | Pods running where they shouldn’t |
| Updated | Nodes running the latest pod template |
How to View DaemonSets
How to View DaemonSet Details
How to Restart a DaemonSet
Restart triggers a rolling restart of pods on all nodes.kubectl.kubernetes.io/restartedAt annotation. Pods are updated one node at a time by default.How to Create a DaemonSet
How to Edit a DaemonSet
Modify Spec
- Container image (triggers rolling update)
- Resource requests/limits
- Environment variables
- Node selector or tolerations
How to Delete a DaemonSet
Update Strategies
DaemonSets support two update strategies:| Strategy | Description |
|---|---|
| RollingUpdate | Updates pods one node at a time (default). Configurable via maxUnavailable. |
| OnDelete | Only updates pods when they are manually deleted. |
maxUnavailable- Maximum pods that can be unavailable during update (default: 1)maxSurge- Maximum extra pods that can be created during update (optional)
Node Selection
DaemonSets use node selectors and tolerations to control pod placement: Node Selector:Troubleshooting
DaemonSet shows 0 desired pods
DaemonSet shows 0 desired pods
- No nodes match the node selector
- All matching nodes are tainted and DaemonSet lacks tolerations
- Check node labels match the DaemonSet’s node selector
- Verify tolerations for any taints on target nodes
Pods not running on some nodes
Pods not running on some nodes
- Node may have taints that pods don’t tolerate
- Node may not match the node selector
- Node may have insufficient resources
- Check node conditions and taints
Misscheduled pods (pods where they shouldn't be)
Misscheduled pods (pods where they shouldn't be)
- Node selector was changed after pods were scheduled
- Manually created pods matching the selector
- Delete misscheduled pods or update the selector
Rolling update taking too long
Rolling update taking too long
maxUnavailableset too low (default is 1)- Pods taking long to become ready
- Check pod events and logs for startup issues
- Consider increasing
maxUnavailablefor faster updates
Pods keep restarting on nodes
Pods keep restarting on nodes
- Check container logs for crash reasons
- Verify resource limits aren’t too restrictive
- Check if readiness/liveness probes are misconfigured
- Ensure required volumes (hostPath, ConfigMaps) exist on nodes
DaemonSet not running on new nodes
DaemonSet not running on new nodes
- New node may not match node selector
- New node may have taints
- Check if DaemonSet controller is healthy
- Verify the new node is in Ready state
FAQ
How is a DaemonSet different from a Deployment?
How is a DaemonSet different from a Deployment?
Can I run DaemonSet pods on master/control-plane nodes?
Can I run DaemonSet pods on master/control-plane nodes?
node-role.kubernetes.io/control-plane:NoSchedule taint.How do I limit DaemonSet to specific nodes?
How do I limit DaemonSet to specific nodes?
nodeSelector to match nodes with specific labels, or use nodeAffinity for more complex selection rules.What happens when I add a new node?
What happens when I add a new node?
Can I scale a DaemonSet?
Can I scale a DaemonSet?
What's the difference between OnDelete and RollingUpdate?
What's the difference between OnDelete and RollingUpdate?
How do I update pods one node at a time?
How do I update pods one node at a time?
maxUnavailable: 1 (the default). This ensures only one pod is updated at a time across the cluster.Why doesn't my DaemonSet have pods on all nodes?
Why doesn't my DaemonSet have pods on all nodes?