Cordon a Node
Marking a node as unschedulable prevents the scheduler from placing new Pods onto that node while not affecting existing Pods on the node. This is useful as a preparatory step before a node reboot or other maintenance.
Log in to the console as
admin and go to the Cluster Management page. To mark a node unschedulable, choose Cluster Nodes under Nodes from the left menu, find a node you want to remove from the cluster, and click Cordon. Alternatively, you can run the command
kubectl cordon $NODENAME directly. See Kubernetes Nodes for more details.
Delete a Node
To delete a node, you need to prepare the configuration file of your cluster first, which is the one created when you set up your cluster. If you do not have it, use KubeKey to retrieve cluster information (a file
sample.yamlwill be created by default).
./kk create config --from-cluster
Make sure you provide all the information of your hosts in the configuration file and run the following command to delete a node.
./kk delete node <nodeName> -f sample.yaml