Inferensys

Glossary

DaemonSet

A DaemonSet is a Kubernetes workload controller that ensures a copy of a specific pod runs on all (or some) nodes in the cluster.
Control room desk with laptops and a large orchestration network display.
KUBERNETES WORKLOAD

What is a DaemonSet?

A DaemonSet is a core Kubernetes controller for deploying system-level services across a cluster.

A DaemonSet is a Kubernetes workload controller that ensures a copy of a specified Pod runs on all (or a subset of) nodes in the cluster. It is a fundamental building block for deploying cluster-wide infrastructure services like log collectors (e.g., Fluentd), monitoring agents (e.g., Prometheus Node Exporter), and network plugins. The controller automatically manages pod placement, creating pods on new nodes as they join the cluster and garbage-collecting pods from removed nodes.

Within agent telemetry pipelines, a DaemonSet is the standard method for deploying observability collectors—such as the OpenTelemetry Collector, Vector, or Grafana Agent—as a local sidecar on every node. This pattern ensures low-latency, host-level data collection for logs, metrics, and traces before the telemetry is enriched and forwarded to a backend. Its self-healing properties and tight integration with the node lifecycle make it essential for reliable, cluster-wide observability.

KUBERNETES WORKLOAD

Key Characteristics of a DaemonSet

A DaemonSet is a Kubernetes controller that ensures a copy of a specific Pod runs on all (or a subset of) nodes in a cluster. It is a foundational pattern for deploying cluster-wide infrastructure services.

01

Node-Level Deployment Guarantee

The core function of a DaemonSet is to guarantee that a Pod template is scheduled and runs on every eligible node in the cluster. When a new node joins the cluster, the DaemonSet controller automatically deploys the Pod to it. Conversely, when a node is removed, its Pod is garbage collected. This ensures a uniform, node-level presence for services like:

  • Log collectors (e.g., Fluentd, Filebeat)
  • Monitoring agents (e.g., Prometheus Node Exporter, Datadog Agent)
  • Network plugins (e.g., Calico, Cilium)
  • Storage daemons (e.g., Gluster, Ceph)
02

Selective Deployment with Node Selectors

DaemonSets can target a subset of nodes using nodeSelectors and affinity/anti-affinity rules. This is critical for heterogeneous clusters where a service should only run on nodes with specific hardware (e.g., GPUs), roles (e.g., node-role.kubernetes.io/ingress), or labels (e.g., disk=ssd). For example, a GPU monitoring agent would use a node selector like accelerator: nvidia-tesla-v100 to deploy only to GPU-equipped nodes.

03

Direct Pod Management, No Replica Count

Unlike a Deployment, which manages a Pod lifecycle via an intermediate ReplicaSet to maintain a desired count of identical Pods, a DaemonSet directly manages Pods based on node inventory. There is no replicas field. The desired state is defined by the node selector and the cluster's node count. Pods are named with the template hash and the node name (e.g., fluentd-abc12-node-01), providing a clear 1:1 mapping to their host.

04

Use Case: Agentic Telemetry Pipelines

In Agentic Observability, DaemonSets are the standard method for deploying the data collection layer of a telemetry pipeline. A DaemonSet ensures every node runs an instance of a telemetry agent (e.g., OpenTelemetry Collector, Grafana Agent, Vector) that is responsible for:

  • Receiving traces/spans from instrumented applications on the local node.
  • Scraping node-level metrics (CPU, memory, disk).
  • Collecting container logs from the node's container runtime.
  • Enriching data with node-level attributes (e.g., AZ, instance type).
  • Forwarding data reliably to a central OTel Collector or backend. This provides a scalable, resilient foundation for capturing signals from autonomous agents and their infrastructure.
05

Update Strategies: RollingUpdate & OnDelete

DaemonSets support two update strategies for rolling out new Pod templates:

  • RollingUpdate (Default): Updates Pods on nodes in a controlled, rolling fashion. You can configure maxUnavailable (e.g., 1) to limit how many nodes can be down during the update.
  • OnDelete: The DaemonSet only creates new Pods with the updated template when you manually delete the old Pods on each node. This provides maximum control for stateful or sensitive node-level services. Updates are triggered by changes to the Pod template spec (spec.template).
06

Interaction with Taints and Tolerations

DaemonSets often require tolerations to deploy Pods onto tainted nodes. Master/control plane nodes commonly have a taint like node-role.kubernetes.io/master:NoSchedule. To run a cluster-wide monitoring agent on these nodes, the DaemonSet's Pod spec must include a matching toleration. This is a key differentiator from standard Deployments and is essential for full cluster coverage. The DaemonSet controller itself does not add tolerations automatically; they must be explicitly defined in the Pod template.

DAEMONSET

Frequently Asked Questions

A DaemonSet is a core Kubernetes workload controller essential for deploying cluster-wide services. These questions address its operational mechanics, use cases, and role in observability pipelines.

A DaemonSet is a Kubernetes controller that ensures a copy of a specific Pod runs on all (or a subset of) nodes in the cluster. It works by continuously monitoring the cluster's node pool. When a new node is added that matches the DaemonSet's node selector or tolerations, the controller automatically schedules a pod replica onto it. Conversely, if a node is removed, the pod is garbage collected. This mechanism is ideal for deploying cluster-level infrastructure services that must be present on every node, such as log collectors, monitoring agents, or network proxies.

Key operational mechanics include:

  • Node Affinity/Selector: Controls which nodes the pods are scheduled on.
  • Tolerations: Allows pods to be scheduled onto nodes with specific taints.
  • Rolling Updates: Supports controlled, node-by-node updates to the pod template.
  • Pod Deletion: Deleting a DaemonSet object removes all the pods it created.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.