website/content/en/docs/installing-on-linux/cluster-operation/remove-nodes.md
Sherlock113 a6432487a1 Rewrite add and delete nodes
Signed-off-by: Sherlock113 <sherlockxu@yunify.com>
2021-01-07 17:07:11 +08:00

1.5 KiB

title keywords description linkTitle weight
Delete Nodes Kubernetes, KubeSphere, scale-in, remove-nodes How to remove nodes from an existing cluster. Delete Nodes 3420

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.

cordon

{{< notice note >}}

Pods that are part of a DaemonSet tolerate being run on an unschedulable node. DaemonSets typically provide node-local services that should run on the node even if it is being drained of workload applications.

{{</ notice >}}

Delete a Node

You can delete the node using KubeKey by the following command. The config-sample.yaml file is the one created when you set up the cluster.

./kk delete node <nodeName> -f config-sample.yaml