After you enable nodal drainage on the console, CCE configures the node to be non-schedulable and securely evicts all pods that comply with Rules for Draining Nodes on the node. Subsequent new pods will not be scheduled to this node.
When a node becomes faulty, nodal drainage quickly isolates the faulty node. The pods evicted from the faulty node will be scheduled by the workload controller to other nodes that are running properly.
To ensure service availability during drainage, specify a disruption budget for your application. Otherwise, the application may become unavailable during pod rescheduling.
When a node is drained, all pods on the node will be safely evicted. However, CCE will take specific actions for pods that meet certain filtering criteria.
Filter Criterion |
Forced Drainage Enabled |
Forced Drainage Disabled |
---|---|---|
The status.phase field of the pod is Succeeded or Failed. |
Deletion |
Deletion |
The pod is not managed by the workload controller. |
Deletion |
Drainage cancellation |
The pod is managed by DaemonSet. |
None |
Drainage cancellation |
A volume of the emptyDir type is mounted to the pod. |
Eviction |
Drainage cancellation |
The pod is a static pod directly managed by kubelet |
None |
None |
The following operations may be performed on pods during node drainage:
In clusters of v1.23.16-r0, v1.25.11-r0, v1.27.8-r0, v1.28.6-r0, v1.29.2-r0, or later versions, node drainage can be canceled.
This operation will abort drainage on nodes, but workloads that have been evicted from these nodes will not be automatically migrated back.