Remove node from Microk8s cluster
By Sarah Rodriguez •
I've dead node which I probably removed using kubectl instead of microk8s command. The problem is that microk8s status still shows it among datastore standby nodes. How can it be deleted from the cluster?
microk8s remove-node 192.168.1.3 --force
Error from server (NotFound): nodes "192.168.1.3" not found
Node 192.168.1.3 does not exist in Kubernetes.Is it safe to remove the node from /var/snap/microk8s/current/var/kubernetes/backend/cluster.yaml ?
2 Answers
Finally it seems that works:
- Adding a new node with the same name using
microk8s join - This node is broken (microk8s is not running)
- Remove the node from cluster by running
microk8s leaveat the node itself - If needed, the node with the same name can be added again and works
On the (slave) node that you want remove from the cluster run:
microk8s leaveon the master node:
find the name of the node that you want to remove from the cluster:
microk8s.kubectl get nodesthen:
microk8s remove-node <name-of-the-node> More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"