ccd
ccd

Reputation: 6918

Failed to remove etcd after reset kubeadm

When I try to kubeadm reset -f, it report the etcd server can not be removed, you must remove it manually.

failed to remove etcd member: error syncing endpoints with etc: etcdclient: no available endpoints. Please manually remove this etcd member using etcdctl

Upvotes: 2

Views: 3185

Answers (1)

Jesse Stuart
Jesse Stuart

Reputation: 596

Is this a control-plane (master) node?

If not: simply running kubectl delete node <node_id> should suffice (see reference below). This will update etcd and take care of the rest of cleanup. You'll still have to diagnose what caused the node to fail to reset in the first place if you're hoping to re-add it... but that's a separate problem. See discussion e.g., here on a related issue:

If the node is hard failed and you cannot call kubeadm reset on it, it requires manual steps. you'd have to:

  1. Remove the control-plane IP from the kubeadm-config CM ClusterStatus

  2. Remove the etcd member using etcdctl

  3. Delete the Node object using kubectl (if you don't want the Node around anymore)

1 and 2 apply only to control-plane nodes.

Hope this helps — if you are dealing with a master node, I'd be happy to include examples of what commands to run.

Upvotes: 2

Related Questions