运行命令:
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到从节点的相同路径即可
参考链接: