helm list error: configmaps?labelSelector=OWNER%!D(MISSING)TILLER

root@n-1:~# helm list
Error: Get https://10.96.0.1:443/api/v1/namespaces/kube-system/configmaps?labelSelector=OWNER%!D(MISSING)TILLER: dial tcp 10.96.0.1:443: i/o timeout
root@n-1:~# kubectl get po --all-namespaces

root@n-1:~# kubectl logs tiller-deploy-86d6b887c7-jpqrf -n kube-system
[main] 2020/01/19 02:34:52 Starting Tiller v2.14.1 (tls=false)
[main] 2020/01/19 02:34:52 GRPC listening on :44134
[main] 2020/01/19 02:34:52 Probes listening on :44135
[main] 2020/01/19 02:34:52 Storage driver is ConfigMap
[main] 2020/01/19 02:34:52 Max history per release is 0
[storage] 2020/01/19 02:36:07 listing all releases with filter
[storage/driver] 2020/01/19 02:36:37 list: failed to list: Get https://10.96.0.1:443/api/v1/namespaces/kube-system/configmaps?labelSelector=OWNER%3DTILLER: dial tcp 10.96.0.1:443: i/o timeout
root@n-1:~# kubectl exec -it tiller-deploy-67f898b665-pzngm -n kube-system -- /bin/sh
~ $ env
KUBERNETES_SERVICE_PORT=443
CALICO_ETCD_SERVICE_PORT=6666
CALICO_ETCD_PORT=tcp://10.96.232.136:6666
KUBERNETES_PORT=tcp://10.96.0.1:443
CALICO_ETCD_PORT_6666_TCP_ADDR=10.96.232.136
KUBE_DNS_SERVICE_PORT_DNS_TCP=53
HOSTNAME=tiller-deploy-67f898b665-pzngm
TILLER_DEPLOY_SERVICE_HOST=10.106.167.132
CALICO_ETCD_PORT_6666_TCP_PORT=6666
SHLVL=1
........

========================================

貌似这个问题不是helm的问题,但是在helm里有issues,详看:

https://github.com/helm/helm/issues/3347

========================================

当运行 helm ls 产生报错

[root@zk1 ~]# helm ls
Error: Get http://localhost:8080/api/v1/namespaces/kube-system/configmaps?labelSelector=OWNER%!D(MISSING)TILLER: dial tcp [::1]:8080: connect: connection refused

该报错是由于helm未将KUBERNETES_MASTER环境变量从kubectl config中带入tiller的容器中,可以通过编辑deployment的环境变量强行写入

命令:

root@n-1:~# kubectl edit deploy tiller-deploy -n kube-system
deployment.extensions "tiller-deploy" edited

kubectl edit deploy tiller-deploy -n kube-system

在container-env中加入master即可

  containers:
  - env:
    - name: TILLER_NAMESPACE
      value: kube-system
    - name: TILLER_HISTORY_MAX
      value: "0"
    - name: KUBERNETES_MASTER
      value: 172.16.7.45:8080

========================================
参考:
https://stackoverflow.com/questions/57046162/installing-helm-on-minikube-return-an-error

你可能感兴趣的:(Helm)