What Is a Kubernetes DaemonSet?
Kubernetes DaemonSet is a controller that ensures a copy of a specified pod runs on every node in the cluster, or on a selected subset of nodes. As new nodes are added, the DaemonSet automatically schedules pods on them. When nodes are removed, the corresponding pods are garbage collected. DaemonSets are used for infrastructure-level workloads that must run on every machine.
Why DaemonSets Matter
Certain workloads, such as log collectors, monitoring agents, and network plugins, need to run on every node to function correctly. Deployments cannot guarantee one pod per node, and running these manually would be impractical in dynamic clusters where nodes come and go. DaemonSets automate this by ensuring the required agent is always present on every eligible node.
In auto-scaling Kubernetes clusters, nodes are frequently added and removed based on workload demand. DaemonSets automatically handle this dynamism, ensuring that every new node immediately gets the required infrastructure agents without manual intervention. This is critical for maintaining consistent monitoring, logging, and security coverage across the entire cluster at all times.
How DaemonSets Work
When you create a DaemonSet, the controller identifies all nodes in the cluster and schedules one pod on each. If a node is added later, the DaemonSet automatically creates a pod on it. If a node is removed, the pod is cleaned up. You can use node selectors and tolerations to target specific nodes, such as running a GPU monitoring agent only on nodes with GPUs.
Understanding how kubernetes daemonset fits into the broader cloud-native ecosystem is important for making informed architecture decisions. It works alongside other tools and practices in the DevOps and platform engineering space, and choosing the right combination depends on your team's specific requirements, scale, and operational maturity.
Key Features
Per-Node Scheduling
DaemonSets guarantee exactly one pod per node, ensuring full cluster coverage for infrastructure agents.
Automatic Scaling
As the cluster grows or shrinks, DaemonSets automatically add or remove pods to match the current set of nodes.
Node Selection
Use node selectors, affinities, and tolerations to target specific nodes for DaemonSet pods.
Rolling Updates
DaemonSets support rolling updates, allowing you to upgrade agents across all nodes without downtime.
Common Use Cases
Running log collection agents like Fluentd or Fluent Bit on every node to aggregate logs centrally.
Deploying monitoring exporters like the Prometheus node exporter to collect system-level metrics from every node.
Installing CNI plugins or network agents that must run on every node for cluster networking to function.
Running security agents that scan each node for vulnerabilities or policy violations continuously.
How Obsium Helps
Obsium's Kubernetes consulting team helps organizations implement and optimize kubernetes daemonset as part of production-grade infrastructure. Whether you are adopting kubernetes daemonset for the first time or looking to improve an existing implementation, our engineers bring hands-on experience across cloud platforms and Kubernetes environments. Learn more about our Kubernetes consulting services →
Recent Posts
Ready to Get Started?
Let's take your observability strategy to the next level with Obsium.
Contact Us