A DaemonSet is a set of pods that is run only once on a host.
It's used for host-layer features, for instance a network, host monitoring or storage plugin or other things which you would never want to run more than once on a host.
A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created.
Some typical uses of a DaemonSet are:
-
running a cluster storage daemon, such as glusterd, ceph, on each node.
-
running a logs collection daemon on every node, such as fluentd or logstash.
-
running a node monitoring daemon on every node.