When a machine is deleted, the machine-controller first evicts its pods, respecting PodDisruptionBudgets. If eviction does not finish before a timeout, the instance is deleted anyway. This way, a blocked eviction cannot stall machine deletion.
The timeout is set by the skipEvictionAfter field:
spec.componentsOverride.machineController.skipEvictionAfterspec.defaultComponentSettings.machineController.skipEvictionAfterThe Cluster value wins over the ClusterTemplate, which wins over the Seed.
| Value | Behavior |
|---|---|
| unset | The default of two hours applies. |
0s | The timeout is disabled. |
positive, for example 30m | Eviction stops after this duration and the node is force-deleted. |
| negative | Rejected. |
apiVersion: kubermatic.k8c.io/v1
kind: Cluster
spec:
componentsOverride:
machineController:
skipEvictionAfter: 0s
With the timeout disabled, the machine waits for eviction as long as its node is Ready and a schedulable target node exists. Otherwise, eviction is still skipped.
The machine-controller.kubermatic.io/skip-eviction-after annotation overrides the timeout for a machineDeployment or a single machine:
kubectl annotate machinedeployment --namespace kube-system <name> \
machine-controller.kubermatic.io/skip-eviction-after=30m
kubectl annotate machine --namespace kube-system <name> \
machine-controller.kubermatic.io/skip-eviction-after=1h
0 disables the timeout.In older machine-controller versions, an annotation value of 0 skipped eviction immediately. If you used 0 before upgrading, check that the new behavior is what you want.
To skip eviction for a node, use the kubermatic.io/skip-eviction annotation on the node.