4.5.2 High Availability Cluster

Removing a worker node from a high availability cluster follows a similar process, but uses the kubeadm-ha-setup down command instead. Since this operation is destructive, the utility warns you when you attempt to do this on a worker node and requires confirmation to continue with the action. The script also reminds you that you need to remove the node from the cluster configuration:

# kubeadm-ha-setup down
[WARNING] This operation will clean up all kubernetes installations on this node
press [y] to continue ...
[INFO] Removing interface flannel.1

The cluster must be updated so that it no longer looks for a node that you have decommissioned. Remove the node from the cluster using the kubectl delete node command on any of your master nodes:

$ kubectl delete node worker1.example.com
node "worker1.example.com" deleted

Substitute worker1.example.com with the name of the node that you wish to remove from the cluster.

If you run the kubeadm-ha-setup command on any of your master nodes, the only way to recover the cluster is to restore from a backup file.