kubectl get node 报错

报错如下:
这里写图片描述

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

解决办法:

执行:

cp /etc/kubernetes/admin.conf $HOME/

chown $(id -u):$(id -g) $HOME/admin.conf

export KUBECONFIG=$HOME/admin.conf

这里写图片描述

猜你喜欢

转载自blog.csdn.net/u012999810/article/details/79560773