kubernetes 错误及解决方法

kubernetes 错误及解决方法

  1. 背景: 因机器关机导致k8s服务被迫停止,再想启动就报错
root@1111111:~# kubectl get pods  The connection to the server localhost:8080 was refused - did you specify the right host or port
解决方法:
	root@1111111:~# echo "export KUBECONFIG=/etc/kubernetes/kubelet.conf" >> /etc/profile
	root@1111111:~# source /etc/profile
执行完以上两步 成功恢复

猜你喜欢

转载自blog.csdn.net/weixin_44946147/article/details/121484286