How to completely remove the tunnels

I installed the kubernetes cluster using kubeadm following this guide . After some time, I decided to reinstall K8s, but ran into problems when deleting all related files and did not find documentation on the official website on how to remove the cluster installed through kubeadm. Has anyone encountered the same problems and know the correct way to delete all files and dependencies? Thanks in advance.

For more information, I removed kubeadm, kubectl and kubelet using apt-get purge/remove but when I started installing the cluster again, I got the following errors:

 [preflight] Some fatal errors occurred: Port 6443 is in use Port 10251 is in use Port 10252 is in use /etc/kubernetes/manifests is not empty /var/lib/kubelet is not empty Port 2379 is in use /var/lib/etcd is not empty 
+13
uninstall kubernetes kubeadm
source share
3 answers

use the kubeadm reset command. this will override the configuration of the cubernet cluster.

+19
source share

In my "Ubuntu 16.04" I use the following steps to completely remove and clean Kubernetes (installed using "apt-get"):

 kubeadm reset sudo apt-get purge kubeadm kubectl kubelet kubernetes-cni kube* sudo apt-get autoremove sudo rm -rf ~/.kube 

And restart your computer.

+19
source share

The manual you linked now has a “ Tear Down ” section:

When talking to the wizard with the appropriate credentials, run:

 kubectl drain <node name> --delete-local-data --force --ignore-daemonsets kubectl delete node <node name> 

Then, on the node to be deleted, reset all installed kubeadm states:

 kubeadm reset 
+4
source share

All Articles