Usage Scenario
When using Deployments, you have to run a workload on each node of your cluster explicitly. A more experienced colleague has told you that you should use a DaemonSet instead. You want to know what a DaemonSet is and how it works.
What Are DaemonSets in Kubernetes?
With ReplicaSets, you can specify how many replicas of a given Pod should be running in your cluster. However, you cannot determine on which nodes the Pods are running. Kubernetes, as a container orchestrator, decides on which nodes the Pods should be scheduled based on the available resources on the nodes. However, in some cases, there must be only one copy of the Pod running on a given set of nodes in your cluster.
A DaemonSet is a unique Kubernetes workload that ensures that a given Pod runs on a subset of nodes in your Kubernetes cluster. Typically, DaemonSets are helpful for services such as logging agents, monitoring agents, or other services that need to run as a single copy on a subset of nodes in your cluster.

Workloads defined as DaemonSets are not scheduled by the default scheduler kube-scheduler. Instead, the DaemonSet controller creates a Pod on each node by default. A subset of nodes can be selected by specifying a node selector. The DaemonSet controller then creates a Pod on each node that matches the specified node selector.
The controller ensures that the Pod is running on the specified node. If the node is deleted, the controller creates a new Pod on the new node. Like the kube-scheduler, the DaemonSet controller also runs the reconciliation loop to ensure that the desired state is always met and reschedules the Pod if necessary.