Specify scheduling order of a Kubernetes DaemonSet
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Kubernetes does not offer a strict "schedule these DaemonSet Pods in this exact node order" feature. A DaemonSet's job is to ensure that every eligible node gets a Pod. You can influence eligibility and rollout behavior, but not define a deterministic node-by-node scheduling sequence the way you might imagine from a batch scheduler.
Understand What a DaemonSet Controls
A DaemonSet creates one Pod per eligible node. Eligibility is shaped by things such as node selectors, affinity, taints, tolerations, and resource availability. Once a node is eligible, the DaemonSet controller and scheduler work to place the Pod there.
That means there are really two different questions developers often mix together:
- Which nodes should run the DaemonSet
- In what order should Pods appear or update
Kubernetes gives you good tools for the first question and partial control for the second, but not a strict global order.
Influence Placement with Labels and Affinity
If you need to stage DaemonSet rollout across groups of nodes, the normal pattern is to separate the nodes with labels and target them deliberately.
With this approach, only nodes labeled rollout-group=group-a receive the Pod. Later, you can expand the label set or apply a second DaemonSet for the next group. This is how you approximate ordering: not by one global schedule, but by staged eligibility.
Use Update Strategy for Controlled Rollouts
For updates, the main built-in knob is the rolling update strategy. DaemonSets support maxUnavailable, which lets you limit how many nodes can be without the updated Pod at once.
This does not let you say "node A before node B," but it does let you slow the rollout down and reduce disruption. If the order really matters because some nodes are more sensitive than others, split the rollout into multiple DaemonSets or use labels and manual progression.
PriorityClass can also affect which Pods get scheduled first under resource pressure, but that is still not the same as defining an exact DaemonSet order.
When You Need More Than One DaemonSet
If your operational requirement is "run this system Pod on one class of nodes first, verify it, then move to the rest," the clearest design is often multiple DaemonSets or one DaemonSet plus staged node labels. Trying to force a single DaemonSet into a strict node order usually works against the model Kubernetes actually provides.
This is common for logging agents, security agents, and storage helpers where a careful rollout matters more than immediate full coverage.
Common Pitfalls
The most common mistake is expecting a built-in field that defines a hard scheduling order for DaemonSet Pods. Kubernetes does not provide that.
Another issue is confusing rollout control with scheduling order. maxUnavailable helps manage disruption during updates, but it does not define a deterministic node sequence.
People also sometimes try to solve the problem with RBAC or unrelated controller settings when the real tools are node labels, affinity, taints, tolerations, and staged rollouts.
Summary
- A DaemonSet does not support strict explicit node-by-node scheduling order.
- You can influence which nodes are eligible by using labels, affinity, selectors, taints, and tolerations.
- For updates,
maxUnavailablecontrols rollout pressure but not exact node order. - If rollout order matters operationally, stage nodes into groups or use multiple DaemonSets.
- Think in terms of eligibility and phased rollout rather than a hard scheduling sequence.
Related reading
- Specify the order Dockers run on Kubernetes pod
- Spring Boot custom Kubernetes readiness probe
- Spring boot on Kubernetes does not get restarted on java.lang.OutOfMemoryError Java heap space
- Spring Cloud Kubernetes - Spring boot fails to start when config reload is enabled
- Specifying superuser PostgreSQL password for a Docker Container
- Spring Boot containers can not connect to the Kafka container
- Spring Cloud Kubernetes Configuration Watcher with Notification Recipient Not Based on Secret Name
- Spring Cloud Kubernetes Spring Cloud Gateway Unable to find instance for k8s service

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.