How to uninstall / remove tiller from Kubernetes manually?

14,223

Solution 1

Tiller can be uninstalled using the command

helm reset --force

or

helm reset --force --wait

It will force the clean of all resources inside the cluster. With that you are able to run helm init again.

Solution 2

kubectl delete deployment tiller-deploy -n k8s-tiller
kubectl delete service tiller-deploy -n k8s-tiller
kubectl delete -n=k8s-tiller rs tiller-deploy-6f65cf89

Initially I ran init with the --namespace set as k8s-tiller

This also might be useful:

kubectl get all --all-namespaces | grep tiller

Solution 3

I think this is what you looking for:

Remove all sensitive info created for tiller:

kubectl get -n kube-system secrets,sa,clusterrolebinding -o name|grep tiller|xargs kubectl -n kube-system delete
kubectl get all -n kube-system -l app=helm -o name|xargs kubectl delete -n kube-system

First command remove all senstive info that might be left for behind, and the last one removes all workloads (pods,services,deployments,replicasets) filtering by the label app=helm

Solution 4

I use SSL between Helm and Tiller, so this worked for me:

kubectl delete deployment tiller-deploy -n kube-system
kubectl delete service tiller-deploy -n kube-system
kubectl delete secret tiller-secret -n kube-system

If you don't delete the secret, you get the "Tiller is already installed on this cluster" error and the certs are not updated (which makes Helm hang).

Share:
14,223
Chris Stryczynski
Author by

Chris Stryczynski

Software dev(op). Independent consultant available for hire! Checkout my GitChapter project on github!

Updated on June 12, 2022

Comments

  • Chris Stryczynski
    Chris Stryczynski almost 2 years

    I've by mistake installed an unsecured configuration of tiller.

    I've tried helm reset but something must have corrupted because now when I try to install helm:

    $HELM_HOME has been configured at /home/chris/.helm.
    Warning: Tiller is already installed in the cluster.
    (Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)
    Happy Helming!
    

    However if I try helm ls I get:

    Error: could not find tiller.

    So because helm reset is insufficient, or there is some bugs, which resources do I need to delete in order to be able to reinstall helm correctly (helm init)?

  • Chris Stryczynski
    Chris Stryczynski over 5 years
    The first command is not a very safe command to be re running... It is helpful none the less.
  • Ivan Aracki
    Ivan Aracki over 5 years
    removing of rs not necessary