【k8s】The connection to the server localhost:8080 was refused - did you specify the right host or port
在主机上配置了kubeconfig,但同事反馈kubectl get报错The connection to the server localhost:8080 was refused - did you specify the right host or port。
这个错误提示表示kubectl命令无法连接到Kubernetes API Server。
原因:
在paasuser用户的家目录下配置的kubeconfig,同事使用root用户登录,无法使用kubectl。将kubeconfig复制一份到root的家目录即可。

浙公网安备 33010602011771号