how to reset kubernetes cluster1 min read

You might have come across some situation to reconfigure or reset your existing Kubernetes cluster.

And you may try with the kubeadm reset command but which won’t reset the Kubernetes cluster fully, where you will be able to see some older information about the cluster.

Here I will show you how to wipe out the Kubernetes cluster permanently.

Rest kubernetes cluster using kubeadm

kubeadm reset -f

Remove all the data from all below locations

rm -rf /etc/cni /etc/kubernetes /var/lib/dockershim /var/lib/etcd /var/lib/kubelet /var/run/kubernetes ~/.kube/*

Flush all the firewall (iptables) rules

iptables -F && iptables -X
iptables -t nat -F && iptables -t nat -X
iptables -t raw -F && iptables -t raw -X
iptables -t mangle -F && iptables -t mangle -X

Restart the Docker service

 

systemctl restart docker

By this you have completely removed all Kubernetes from the server, Now you can reconfigure the cluster with a new set of Kubernetes configurations.

 

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me
We need your support!!
Other Amount:
techrunnr.com:
#1
#2
#3
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

You may also like...

Leave a Reply