Enable the ability to cordon/uncordon/drain nodes #4006
Labels
area/kubernetes
kind/enhancement
Applied to Feature Requests
layer/frontend
Required changes impact the client/frontend
Requirements
Allow an administrator user to execute the following node operations: Drain, Cordon and Uncordon.
Required changes
Node details view
Add a new Availability property under status with a dropdown allowing the administrator user to change the Availability of the node.
The availability dropdown should contain the following options:
Once the user has selected a new Availability for the node, the update node and cancel button should be enabled.
Using the Cordon action should prompt the user with a confirmation modal with the following message: "Marking this node as unschedulable will effectively cordon the node and prevent any new workload from being scheduled on that node. Are you sure?"
Using the Drain action should prompt the user with a confirmation modal with the following message: "Draining this node will cause all workloads to be evicted from that node. This might lead to some service interruption. Are you sure?".
We should prevent any drain operation on a node if a drain operation is already in progress on another node. If a node is currently being drained, the Drain action should be disabled and a tooltip with the following message should be visible when hovering the Drain action: "Cannot use this action while another node is currently being drained."
Quoted from the kubernetes documentation:
"The kubectl drain command should only be issued to a single node at a time."
We should investigate and replicate the behavior of kubectl regarding the drain action (investigate what happens if kubectl fails during a drain action for example).
References
Based on this https://stackoverflow.com/a/57190700/1127536 Stackoverflow post it seems that it is possible to cordon/uncordon a node by changing the
spec.unschedulable
property of that node.It also gives more details about the drain action which might require the following orchestration:
The Eviction API can be used to programmatically evict pod: https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/#eviction-api
The text was updated successfully, but these errors were encountered: