Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to delete tiller from kubernetes cluster

Tiller is not working properly in my kubernetes cluster. I want to delete everything Tiller. Tiller (2.5.1) has 1 Deployment, 1 ReplicaSet and 1 Pod.

I tried: kubectl delete deployment tiller-deploy -n kube-system

  • results in "deployment "tiller-deploy" deleted"
  • however, tiller-deploy is immediately recreated
  • kubectl get deployments -n kube-system shows tiller-deploy running again

I also tried: kubectl delete rs tiller-deploy-393110584 -n kube-system

  • results in "replicaset "tiller-deploy-2745651589" deleted"
  • however, tiller-deploy-2745651589 is immediately recreated
  • kubectl get rs -n kube-system shows tiller-deploy-2745651589 running again

What is the correct way to permanently delete Tiller?

like image 948
Bill Avatar asked Nov 30 '17 22:11

Bill


People also ask

How do I remove a tiller from Kubernetes?

Because Tiller stores its data in Kubernetes ConfigMaps, you can safely delete and re-install Tiller without worrying about losing any data. The recommended way of deleting Tiller is with kubectl delete deployment tiller-deploy --namespace kube-system , or more concisely helm reset .

How do I remove applications from Kubernetes cluster?

A Kubernetes application can be uninstalled by deleting/uninstalling the files in the reverse order of their creation.

What is Tiller in Kubernetes?

Helm Tiller acted as an intermediary between users and the Kubernetes API server, and handled role-based access control (RBAC) and the rendering of Helm charts for deployment to the cluster. With the first stable release of Helm version 3 on Nov.

What happens if I delete a service in Kubernetes?

delete services Show activity on this post. Kubernetes objects like Service and Deployment/ReplicaSet/Pod are independent and their deletions do not cascade to each other (like it does between say Deployment/RS/Pod).


3 Answers

To uninstall tiller from a kubernetes cluster:

helm reset

To delete failed tiller from a kubernetes cluster:

helm reset --force
like image 154
nickgryg Avatar answered Oct 20 '22 14:10

nickgryg


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
like image 25
Fulvio Avatar answered Oct 20 '22 15:10

Fulvio


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.

like image 9
praveen.chandran Avatar answered Oct 20 '22 15:10

praveen.chandran