root@master:/home/# kubectl get nodes
W0318 22:58:51.191952 4982 loader.go:222] Config not found: /root/admin.conf
E0318 22:58:51.243083 4982 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
status not ready will be fixed after reboot the worker node.
run this command:
export KUBECONFIG=/etc/kubernetes/admin.conf
or:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config