Member-only story

Delete and Remove all kubernetes Installations with Add-ons

GABRIEL OKOM
2 min readOct 16, 2023

--

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:

  1. 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…

--

--

GABRIEL OKOM
GABRIEL OKOM

Written by GABRIEL OKOM

MSc Cyber Security and Computer Forensics | Certified DevOps Engineer

No responses yet