赞
踩
The connection to the server apiserver.k8s:6443 was refused - did you specify the right host or port
解决方案
1.首先确保Swap 已经关闭
可以采用临时关闭 swapoff -a
但是断电重启之后需要再次设置 也可以设置永久关闭
2各个节点之间防火墙 一定要检查
systemctl stop firewalld
3.查看kubelet 服务 是否正常
systemctl status kubelet
4.如果一会又不正常了请看详细信息
journalctl -xefu kubelet
5.如果发现Unit kubelet.service entered failed state.code=exited, status=255 说明这台节点有污点 ,将污点删除。
rm -rf /var/lib/kubelet/cpu_manager_state
6.排除问题之后 systemctl start kubelet 重启完成
7.查看node ,pod
kubectl get node
kubectl get pods --all-namespaces
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。