Skip to main content

Can we set the drain timeout and a pause between nodes?

Syself support For release

Yes. The Kubernetes node drain timeout is a setting in the Cluster object: deletion.nodeDrainTimeoutSeconds. Set it on a worker pool's entry in spec.topology.workers.machineDeployments, or under spec.topology.controlPlane.deletion for the control plane. Each pool has its own value. In the Cluster Configurator you find it under the advanced options of a worker pool.

The timeout is how long a drain waits for pods to leave the node. That includes pods a PodDisruptionBudget holds back. When the timeout ends, the node is removed with the pods still on it. Raise it for a pool whose workloads need longer to move, for example a database that has to resync. You find the manifest in Survive node drains. Also give the workload a budget that a drain can meet: Add a PodDisruptionBudget.

A pause between nodes is not a separate setting. By default, the nodes of a pool are replaced one at a time, and the rollout moves on only after the replacement node is Ready. To choose the moment for each node yourself, set the rollout strategy of a worker pool to OnDelete. An update or upgrade then replaces a node of that pool only when you delete its Machine. While such a pool still runs old nodes, an upgrade holds back its last steps, so read Cluster upgrades before you use it. The control plane always replaces one node at a time and waits until the new node is healthy.

Still stuck?

Prepare your case, then email us.