【问题标题】:`helm init` says tiller is already on cluster but it's not?`helm init` 说分蘖已经在集群上,但不是吗?
【发布时间】:2019-09-12 20:18:03
【问题描述】:
vagrant@ubuntu-xenial:~$ helm init 
$HELM_HOME has been configured at /home/vagrant/.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.)
vagrant@ubuntu-xenial:~$ helm ls
Error: could not find tiller

如何进一步诊断?

这是kube-system 中当前正在运行的 pod:

vagrant@ubuntu-xenial:~$ kubectl get pods -n kube-system
NAME                                      READY   STATUS      RESTARTS   AGE
canal-dlfzg                               2/2     Running     2          72d
canal-kxp4s                               2/2     Running     0          29d
canal-lkkbq                               2/2     Running     2          72d
coredns-86bc4b7c96-xwq4d                  1/1     Running     2          49d
coredns-autoscaler-5d5d49b8ff-l6cxq       1/1     Running     0          49d
metrics-server-58bd5dd8d7-tbj7j           1/1     Running     1          72d
rke-coredns-addon-deploy-job-h4c4q        0/1     Completed   0          49d
rke-ingress-controller-deploy-job-mj82v   0/1     Completed   0          49d
rke-metrics-addon-deploy-job-tggx5        0/1     Completed   0          72d
rke-network-plugin-deploy-job-jzswv       0/1     Completed   0          72d

【问题讨论】:

    标签: kubernetes kubernetes-helm


    【解决方案1】:

    问题在于部署/服务帐户不存在。

    vagrant@ubuntu-xenial:~$ kubectl get deployment tiller-deploy --namespace kube-system
    NAME            READY   UP-TO-DATE   AVAILABLE   AGE
    tiller-deploy   0/1     0            0           24h
    
    
    vagrant@ubuntu-xenial:~$ kubectl get events --all-namespaces
    kube-system     4m52s       Warning   FailedCreate    replicaset/tiller-deploy-7f4d76c4b6                 Error creating: pods "tiller-deploy-7f4d76c4b6-" is forbidden: error looking up service account kube-system/tiller: serviceaccount "tiller" not found
    

    我删除了部署并再次运行helm init,然后就成功了:

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

    【讨论】:

      猜你喜欢
      • 2020-01-29
      • 2020-02-02
      • 2021-12-31
      • 2018-05-14
      • 2020-08-07
      • 2020-01-25
      • 2019-08-27
      • 1970-01-01
      • 2019-12-12
      相关资源
      最近更新 更多