kubernets helm 如何删除tiller

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

kuberneter 上面装了 helm 想卸载还并不是那么容易,也不知道怎么搞

后面在stackoverflow 看到大神回复

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

大神就是不一样,果然 解决了我的问题

[root@k8s-master ceph]# kubectl delete deployment tiller-deploy -n k8s-tiller
Error from server (NotFound): deployments.extensions "tiller-deploy" not found
[root@k8s-master ceph]# kubectl delete deployment tiller-deploy -n k8s-tiller
Error from server (NotFound): deployments.extensions "tiller-deploy" not found
[root@k8s-master ceph]# kubectl get pods -n kube-sys
No resources found.
[root@k8s-master ceph]# kubectl get pods -n kube-system
NAME                                    READY   STATUS             RESTARTS   AGE
coredns-7db7dd9c7c-ltlnb                1/1     Running            3          2d16h
coredns-7db7dd9c7c-vmzhb                1/1     Running            5          3d
kube-apiserver-k8s-master               1/1     Running            15         3d
kube-controller-manager-k8s-master      1/1     Running            37         3d
kube-flannel-ds-fdvzr                   1/1     Running            5          3d
kube-flannel-ds-qnjcb                   1/1     Running            3          3d
kube-flannel-ds-v8jsx                   1/1     Running            3          3d
kube-proxy-mksfv                        1/1     Running            5          3d
kube-proxy-prkvf                        1/1     Running            3          3d
kube-proxy-rkwnf                        1/1     Running            3          3d
kube-scheduler-k8s-master               1/1     Running            35         3d
kubernetes-dashboard-7678b7c84f-99kb8   1/1     Running            5          3d
tiller-deploy-69ffbf64bc-c2gbj          0/1     ImagePullBackOff   0          4m7s
[root@k8s-master ceph]# kubectl delete deployment tiller-deploy -n kube-system
Error from server (NotFound): deployments.extensions "tiller-deploy" not found
[root@k8s-master ceph]# kubectl delete deployment tiller-deploy-69ffbf64bc-c2gbj -n kube-system
Error from server (NotFound): deployments.extensions "tiller-deploy-69ffbf64bc-c2gbj" not found
[root@k8s-master ceph]# kubectl delete service tiller-deploy -n kube-system
Error from server (NotFound): services "tiller-deploy" not found
[root@k8s-master ceph]# kubectl delete rs tiller-deploy-69ffbf64bc-c2gbj -n kube-system
Error from server (NotFound): replicasets.extensions "tiller-deploy-69ffbf64bc-c2gbj" not found
[root@k8s-master ceph]# kubectl get all --all-namespaces | grep tiller

kube-system   pod/tiller-deploy-69ffbf64bc-c2gbj          0/1     ImagePullBackOff   0          5m30s



kube-system   replicaset.apps/tiller-deploy-69ffbf64bc          1         1         0       10m
kube-system   replicaset.apps/tiller-deploy-6bcc84d88           0         0         0       2d20h
kube-system   replicaset.apps/tiller-deploy-6f8674fcd6          0         0         0       2d20h
[root@k8s-master ceph]# kubectl get -n kube-system secrets,sa,clusterrolebinding -o name|grep tiller|xargs kubectl -n kube-system delete
clusterrolebinding.rbac.authorization.k8s.io "tiller-cluster-rule" deleted
[root@k8s-master ceph]# kubectl get all -n kube-system -l app=helm -o name|xargs kubectl delete -n kube-system
pod "tiller-deploy-69ffbf64bc-c2gbj" deleted
replicaset.apps "tiller-deploy-69ffbf64bc" deleted
replicaset.apps "tiller-deploy-6bcc84d88" deleted
replicaset.apps "tiller-deploy-6f8674fcd6" deleted
[root@k8s-master ceph]# kubectl get all --all-namespaces | grep tiller

kube-system   pod/tiller-deploy-69ffbf64bc-8p5cx          0/1     Terminating   0          9s



[root@k8s-master ceph]# kubectl get all --all-namespaces | grep tiller




[root@k8s-master ceph]# kubectl get all --all-namespaces | grep tiller




[root@k8s-master ceph]# kubectl get all --all-namespaces | grep tiller




[root@k8s-master ceph]# kubectl get all --all-namespaces | grep tiller




[root@k8s-master ceph]# kubectl get pods -n kube-system
NAME                                    READY   STATUS    RESTARTS   AGE
coredns-7db7dd9c7c-ltlnb                1/1     Running   3          2d17h
coredns-7db7dd9c7c-vmzhb                1/1     Running   5          3d
kube-apiserver-k8s-master               1/1     Running   15         3d
kube-controller-manager-k8s-master      1/1     Running   37         3d
kube-flannel-ds-fdvzr                   1/1     Running   5          3d
kube-flannel-ds-qnjcb                   1/1     Running   3          3d
kube-flannel-ds-v8jsx                   1/1     Running   3          3d
kube-proxy-mksfv                        1/1     Running   5          3d
kube-proxy-prkvf                        1/1     Running   3          3d
kube-proxy-rkwnf                        1/1     Running   3          3d
kube-scheduler-k8s-master               1/1     Running   35         3d
kubernetes-dashboard-7678b7c84f-99kb8   1/1     Running   5          3d

 

posted @ 2019-02-01 11:35  jackluo  阅读(...)  评论(...编辑  收藏