kubernetes - `helm init` 说分蘖已经在集群上,但不是吗?
问题描述
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
我该如何进一步诊断?
以下是当前正在运行的 pod kube-system
:
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
解决方案
问题在于部署/服务帐户不存在。
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
推荐阅读
- php - 为什么引用 set_error_handler 函数闭包时使用的变量未定义?
- oauth-2.0 - Is Authorization code mandatory to grant resource access?
- c - Storing a string in array to use it later
- angular - 自定义表单控件未显示 mat-error
- mysql - Hibernate - Search text in all columns of table
- azure - 未能保存网络接口的 IP 地址更改
- c++ - IAR does not correctly compile C++ file with Auto (extension-based) option enabled
- javascript - Chartjs 未显示实际值(值正在调整大小)
- ios - iOS 13 已安装字体检索
- c - 雷达2:r_reg_get:断言'reg && name'失败(第296行)