Create pod one by one for daemonset

Hello community,

I am observing that when creating a new daemonset, pod on every fitting node will be created at the same time. Is it possible to create new pod one by one like rolling update?

Thank you.

Hi jshen28:

DaemonSets are updated by default using a rolling update : Perform a Rolling Update on a DaemonSet | Kubernetes

As far as I know, you may control on which nodes the DaemonSets are going to be scheduled (with taints, tolerations, etc), but not in what order… (DaemonSet | Kubernetes)

Depending on what you want to achieve, you may “cheat” and deploy a v1 of a DaemonSet with a dummy/no-op container and then perform a “one-by-one” deploy of the “functional” v2 of the DaemonSet using the OnDelete update strategy, terminating the v1 of the DaemonSet on one node and moving to the next node once you are happy with the status of the upgraded pod … You would be able to control which node updates to the “v2” of the DaemonSet, in which order, etc.

Using the rolling update strategy, the pods in the DaemonSet are also upgraded one by one, but you are not able to control which pod will be upgraded next…

Hope it helps,

Xavi

1 Like