root@ubuntu:/opt/module/k8s# kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port?
root@ubuntu:/opt/module/k8s# echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile
root@ubuntu:/opt/module/k8s# source /etc/profile
root@ubuntu:/opt/module/k8s# vim /etc/profile
root@ubuntu:/opt/module/k8s# kubectl get nodes
NAME STATUS ROLES AGE VERSION
ubuntu NotReady master 6m v1.11.1
root@ubuntu:/opt/module/k8s# kubectl get nodes
NAME STATUS ROLES AGE VERSION
ubuntu NotReady master 6m v1.11.1
root@ubuntu:/opt/module/k8s#
k8s The connection to the server localhost:8080 was refused - did you specify the right host or port
最新推荐文章于 2024-06-07 08:56:47 发布