Overview
Introduction
DaemonSets exist for the class of workloads that need to run on every node rather than a fixed replica count, log shippers, node exporters, CNI agents, but their tolerations and nodeSelector fields have a fiddly nested shape that's easy to get wrong from memory.
This tool builds a DaemonSet manifest from a form covering image, ports, environment variables, a node selector, repeatable tolerations, and the update strategy.
What Is Kubernetes DaemonSet Generator?
A form-based generator for the `apps/v1/DaemonSet` resource, the workload controller that ensures a copy of a Pod runs on every node (or every matching node) in the cluster.
It supports a nodeSelector for pinning the DaemonSet to nodes with a given label, and a repeatable list of tolerations so the Pod can be scheduled on nodes that would otherwise repel it.
How Kubernetes DaemonSet Generator Works
Name, image, container ports, and env vars fill in the Pod template the same way they would for any other workload, while nodeSelector and each toleration row map directly onto their respective spec.template.spec fields.
For each toleration, the operator you choose determines which fields are emitted: 'Exists' omits value entirely, 'Equal' requires and includes it, matching how the Kubernetes API itself treats the two operators.
When To Use Kubernetes DaemonSet Generator
Use it for cluster-wide infrastructure Pods: log collectors (Fluent Bit, Fluentd), metrics agents (node-exporter), CNI plugins, or storage daemons that need a presence on every node.
Use the tolerations rows whenever that agent also needs to run on tainted nodes, like control-plane nodes or nodes reserved for a specific workload class.
Often used alongside Kubernetes NetworkPolicy Generator and Kubernetes RBAC Generator.
Features
Advantages
- Handles the Exists/Equal toleration operator distinction correctly, only emitting a `value` field when the operator actually requires one.
- Supports multiple container ports and environment variables without extra boilerplate.
- Covers both update strategies, so rollout behavior is explicit in the generated manifest rather than left to the (often forgotten) default.
Limitations
- Supports one nodeSelector key/value pair; workloads needing multiple selector labels will need to hand-add additional lines.
- Doesn't generate the RollingUpdate strategy's `maxUnavailable` sub-field, defaulting instead to the API server's own default for that value.
Examples
Best Practices & Notes
Best Practices
- Only add tolerations for the specific taints you actually need to run on, over-tolerating can put agent Pods on nodes they weren't meant to run on.
- Use RollingUpdate for most day-to-day agents, and switch to OnDelete only when you need to stage a rollout manually across a fleet of nodes.
- Set resource requests/limits on the container even though this generator focuses on scheduling fields, an unconstrained DaemonSet Pod runs on every node and can starve real workloads if it misbehaves.
Developer Notes
Toleration rendering mirrors the API server's own handling of the two operators: `Equal` always includes both `key` and `value` fields plus `effect`, while `Exists` omits `value` and includes `key` only when one was provided (an empty key with `Exists` tolerates all taints matching the given effect). The node selector is intentionally a single key/value pair rather than a repeatable list, since `nodeSelector` is a flat map and most real DaemonSets only pin on one or two labels.
Kubernetes DaemonSet Generator Use Cases
- Deploying a node-level logging or metrics agent across an entire cluster
- Running a CNI or CSI node plugin that must be present on every node, including control-plane nodes
- Restricting an infrastructure Pod to a specific node pool via nodeSelector, e.g. GPU nodes only
Common Mistakes
- Using operator Equal but leaving the value blank, which the Kubernetes API rejects since Equal requires an exact value match.
- Forgetting a toleration entirely and then wondering why the DaemonSet Pod never schedules onto tainted control-plane or dedicated nodes.
- Setting nodeSelector to a label that no nodes actually carry, silently leaving the DaemonSet with zero running Pods.
Tips
- Check `kubectl describe node <name>` for existing taints before writing tolerations, so the effect and key you choose actually match what's applied in your cluster.