Removing Rancher from a cluster

Removing Rancher from a cluster

Ben Young
Ben Young

As I have been playing around with a few Kubernetes products i have been needing to remove these as I go along. If you need to delete rancher from your cluster here is how you go about it.

  1. Grab the latest release of the Rancher system tools, I grabbed the linux-amd-64 versionhttps://github.com/rancher/system-tools/releases
  2. You will need your Kubeconfig file, I already have my loaded on a jump host i use for managing this cluster

Now from the command line run the following;

    ./system-tools_linux-amd64 remove --kubeconfig ~/.kube/config

When asked, select Y to the removal of the control plane in cattle-system (or something else if you have a custom namespace set)

there are a few options just check out the system-tools git repository for more or the Rancher docs.

It will now go through and remove all items in the cluster relating to the deployment such as accounts, roles, resources etc etc This will run for a while and then it will end with messages saying it is now complete.