Run these commands solved this issue:mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
After running them, kubectl is working.
Run these commands solved this issue:mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
After running them, kubectl is working.
转载于:https://my.oschina.net/chrisforbt/blog/3035527