所遇问题
The connection to the server localhost:8080 was refused - did you specify the right host or port?

解决方法
具体原因:kubenetes master没有与本机绑定,集群初始化的时候没有设置
解决方法:
Step 1:编辑文件/etc/profile并在底部增加新的环境变量
export KUBECONFIG=/etc/kubernetes/admin.conf


Step 2:使环境变量生效
source /etc/profile


当尝试连接到localhost:8080的Kubernetes服务器时遇到拒绝错误,原因是Master节点未与本地主机正确绑定。解决方法包括编辑/etc/profile文件,新增KUBECONFIG环境变量指向/etc/kubernetes/admin.conf,并通过执行source /etc/profile使更改生效。
3838





