运维自动化,减少重复工作,降低知识传递成本,使运维交付更高效、更安全,使产品运行更稳定。对于故障的处理,由事后处理变成提前发现,人工处理变成系统自动容灾。

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

转载请注明:Linux系统自动化运维 » kubernets helm 如何删除tiller

喜欢 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址