kubernetes helm: “lost connection to pod” and “transport is closing” errors

一曲冷凌霜 提交于 2019-12-04 03:54:40

Deleting the tiller deployment and recreating it is only fix I've seen on github (here and here). This has been most helpful to people when the same helm command fails repeatedly (not with intermittent failures, though you could try it).

delete tiller (helm's server-side component):

kubectl delete deployment -n kube-system tiller-deploy
# deployment "tiller-deploy" deleted

and recreate it:

helm init --upgrade
# $HELM_HOME has been configured at /root/.helm.
# Tiller (the helm server side component) has been upgraded to the current version.
# Happy Helming!

Bouncing tiller obviously won't fix the root cause. There is hopefully a better answer than this forthcoming, maybe from https://github.com/kubernetes/helm/issues/2025. This is the only open github issue as of 13 Feb 2018.

I was able to correct this by adding the tiller host information to the helm install command.

--host=10.111.221.14:443

You can get your tiller IP this way

$ kubectl get svc -n kube-system tiller-deploy
NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE
tiller-deploy   ClusterIP   10.111.221.14   <none>        44134/TCP   34h

Full command example

helm install stable/grafana --name=grafana --host=10.111.221.14:4413

I know this is a bit of a work around but all other functions of helm are performing properly after installing via this method. I did not have to add the host information again after the initial install for performing upgrades or rollbacks. Hope this helps!

Memory limits were causing this error for me. The following fixed it:

kubectl set resources deployment tiller-deploy --limits=memory=200Mi
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!