$ docker rm -f -v $(docker ps -q)
$ systemctl stop kubelet
$ systemctl disable kubelet
$ rm -rf /etc/kubernetes /var/lib/kubelet /var/lib/etcd
$ kubeadm reset
[reset] Reading configuration from the cluster...
[reset] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
...
The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
$ yum remove -y kubeadm kubectl kubernetes-cni kubelet kube*
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package kubeadm.x86_64 0:1.22.3-0 will be erased
---> Package kubectl.x86_64 0:1.22.3-0 will be erased
---> Package kubelet.x86_64 0:1.22.3-0 will be erased
---> Package kubernetes-cni.x86_64 0:0.8.7-0 will be erased
--> Finished Dependency Resolution
...
Removed:
kubeadm.x86_64 0:1.22.3-0 kubectl.x86_64 0:1.22.3-0 kubelet.x86_64 0:1.22.3-0 kubernetes-cni.x86_64 0:0.8.7-0
Complete!
$ yum autoremove -y
$ rm -rf ~/.kube