运行命令:

kubectl get pod

报错:
The connection to the server localhost:8080 was refused - did you specify the right host or port?

解决方法:

cat  /etc/kubernetes/kubelet.conf 

clusters.cluster.server 中显示的是master的地址

登陆到master节点,复制主节点文件/etc/kubernetes/admin.conf到从节点的相同路径即可

 

参考链接:

https://blog.csdn.net/lfm940624/article/details/84706118

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐