0

I have k8s cluster installed by rke2. There are 3 master and 2 worker node in cluster. Now i am trying to remain first 1 master including package installed. I drain other 4 nodes and delete other 4 nodes. Finally, how to uninstall software completely on 4 node?

john chen
  • 77
  • 6

1 Answers1

0

As you have already mentioned about a few commands; Please try with the below un-installation method:

  1. Uninstall all the kubernetes packages

    Sudo apt-get remove –purge kublet kubeadm kubectl

  2. Remove the configuration files

    Sudo rm- rf /etc/kubernetes

  3. Remove the data directory

    Sudo rm -rf /ar/lib/kubelet

  4. Remove the kubernetes binaries

    Sudo rm -rf /usr/local/bin/kube*

Once these commands have been run on each node, the software should be completely uninstalled. I have taken reference from below pages; fou further information please have a look at How to Delete Pods from a Kubernetes Node by Keilan Jackson, Uninstalling Kubernetes application and How to delete/remove/clean existing corrupted or old kubeadm kubernetes clusters setup by Rajesh Kumar. I am happy to help further if your issue is not resolved.