“ helm init”表示分till已经在群集中,不是吗?

时间:2019-09-12 12:10:19

标签: kubernetes kubernetes-helm

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

1 个答案:

答案 0 :(得分:2)

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

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