[root@neal neal]# kubectl get pods
The connection to the server 192.168.102.149:6443 was refused - did you specify the right host or port?
正常使用,忽然变成不能用了,如上为报错内容,尝试重启等都不管用,最后找到一个办法:
执行
systemctl daemon-reload
systemctl restart kubelet
确认是否重启是否成功
kubectl get node
kubectl get pod --all-namespaces
又出现了,感觉解决办法是,重启,然后关闭代理,然后执行上面的命令。