Overview
A DaemonSet is used to run 'background' services that need to be present on every node in the cluster. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected.
Use Cases
- Cluster Storage Daemons: Running storage agents like
glusterdorcephon every node. - Log Collection: Running log collectors like
fluentdorlogstashon every node. - Node Monitoring: Running monitoring agents like
Prometheus Node ExporterorDatadog agenton every node.
Scheduling
By default, a DaemonSet runs a Pod on every node, but it can be restricted to specific nodes using node selectors or taints and tolerations.