Member-only story
Delete and Remove all kubernetes Installations with Add-ons
In my previous post; we created a Kubernetes cluster using kubeadm
from scratch to finish. Click here to read more about how to install kubernetes cluster without errors using kubeadm from zero to hero guide.
To safely remove and delete all Kubernetes installations and any associated components like Flannel from the cluster we created, you can follow these steps:
To delete all the Kubernetes installations and associated components provided in the earlier guide, follow these steps:
- On Master and Worker Nodes (if any):
Run the following command on each worker node you want to remove:
sudo kubeadm reset
This will reset the worker node and remove Kubernetes-related configurations.
2. On All Nodes (Control Plane and Worker Nodes):
To remove containerd (or Docker) and other container runtimes, you can use the following command:
sudo dnf remove -y containerd.io
3. Remove kubelet, kubeadm, kubectl, and other Kubernetes components:
sudo dnf remove -y kubelet kubeadm kubectl kubernetes-cni
4. Remove Container Network Interface (CNI):
We installed a CNI plugin (e.g., Flannel), you should remove it. The exact command depends on the CNI used. For Flannel, you can use:
kubectl delete -f…