how to delete tiller from kubernetes cluster

北慕城南 提交于 2019-12-03 00:56:16

To uninstall tiller from a kubernetes cluster:

helm reset

To delete failed tiller from a kubernetes cluster:

helm reset --force

If you want to remove tiller from your cluster the cleanest way it's by removing all the components deployed during the installation.

If you already know the namespace where tiller its deployed:

$ kubectl delete all -l app=helm -n kube-system
pod "tiller-deploy-8557598fbc-5b2g7" deleted
service "tiller-deploy" deleted
deployment.apps "tiller-deploy" deleted
replicaset.apps "tiller-deploy-75f6c87b87" deleted
replicaset.apps "tiller-deploy-8557598fbc" deleted

Be careful with the command, will delete all in the namespace indicated and with the corresponding label.

where app its the label assigned and will identify all component(replication controller, deployments, service, etc).

You can describe the pod to verify the labels:

$ kubectl describes pod tiller-deploy-8557598fbc-5b2g7 -n kube-system
Name: tiller-deploy-8557598fbc-5b2g7
Namespace: kube-system
Priority: 0
PriorityClassName: <none>
Node: srvlpi03 / 192.168.1.133
Start Time: Tue, 20 Aug 2019 15:51:03 -0400
Labels: app = helm
        name = tiller
        pod-template-hash = 8557598fbc
praveen.chandran

You have to uninstall 3 things to completely get rid of tiller:

  1. Deployment
  2. Service
  3. Secret
    kubectl delete deployment -n some-namespace tiller-deploy 
    kubectl delete svc -n some-namespace tiller-deploy 
    kubectl delete secret -n some-namespace tiller-secret

Be sure to backup the secret as it store all the certificates if TLS is enabled.

You can also try below command

kubectl delete deployment tiller-deploy --namespace kube-system

Turns out that it was running as replicaset:

kubectl delete replicasets -n kube-system tiller-deploy-6fdb84698b

worked for me

helm reset --force didn't remove the tiller.

Kubectl get hpa --all-namespaces( OR -n kube-system)

In normal tiller deployment, they use replica set. For your set up there might be a HorizontalPodAutoscaler object which is targeting the replica sets for tiller.

You can delete the HPA first and then delete the associated replicasets, pods, configmaps OR you can reset helm using "helm reset" command.

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