How to uninstall / remove tiller from Kubernetes manually?

不羁岁月 提交于 2019-12-06 08:15:04

问题


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)?


回答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.




回答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



回答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




回答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).



来源:https://stackoverflow.com/questions/53612553/how-to-uninstall-remove-tiller-from-kubernetes-manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!