为什么分till连接到kubernetes api的localhost 8080? [英] Why tiller connect to localhost 8080 for kubernetes api?

查看:102
本文介绍了为什么分till连接到kubernetes api的localhost 8080?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用helm进行kubernetes软件包管理时,安装helm客户端后,

When use helm for kubernetes package management, after installed the helm client,

之后

helm init

我可以看到分er荚在kubernetes集群上运行,然后在运行helm ls时出现错误:

I can see tiller pods are running on kubernetes cluster, and then when I run helm ls, it gives an error:

Error: Get http://localhost:8080/api/v1/namespaces/kube-system/configmaps?labe 
lSelector=OWNER%3DTILLER: dial tcp 127.0.0.1:8080: getsockopt: connection 
refused

并使用kubectl logs我可以看到类似的消息:

and use kubectl logs I can see similar message like:

[storage/driver] 2017/08/28 08:08:48 list: failed to list: Get 
http://localhost:8080/api/v1/namespaces/kube-system/configmaps?
labelSelector=OWNER%3DTILLER: dial tcp 127.0.0.1:8080: getsockopt: connection 
refused

我可以看到分er Pod在节点之一而不是主节点上运行,该节点上没有api服务器运行,为什么它连接到127.0.0.1而不是我的主ip?

I can see the tiller pod is running at one of the node instead of master, there is no api server running on that node, why it connects to 127.0.0.1 instead of my master ip?

推荐答案

在执行helm init之前运行此程序.它对我有用.

Run this before doing helm init. It worked for me.

kubectl config view --raw > ~/.kube/config

这篇关于为什么分till连接到kubernetes api的localhost 8080?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆