Completely remove Kubernetes

12/30/2019

After removing Kubernetes 1.15 (master and worker node):

kubeadm reset
apt-get purge kubeadm kubectl kubelet kubernetes-cni kube*

and removing all config files and installing again 1.17 getting this error while joining cluster:

[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.15" ConfigMap in the kube-system namespace
error execution phase kubelet-start: configmaps "kubelet-config-1.15" is forbidden: User "system:bootstrap:fmhnus" cannot get resource "configmaps" in API group "" in the namespace "kube-system"

What did I miss and where?

-- Jonas
kubernetes

1 Answer

12/30/2019

Follow these steps to completely remove Kubernetes

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

kubeadm reset un-configures the cluster made by kubernetes.

-- kooskoos
Source: StackOverflow