[[email protected] ~]# kubectl get pods --all-namespaces
The connection to the server 192.168.180.110:6443 was refused - did you specify the right host or port?
[[email protected] ~]# docker info
Client:
Debug Mode: false
通过 journalctl -xefu kubelet 看到了
上面就说得很清楚了,是没有禁用 swap 导致的
找到原因后,解决就快了
但是我部署这套测试环境的时候,已经禁掉了,重启没有生效,别的服务器都可以,这个问题需查找一下。
[[email protected] ~]# 关闭Swap,机器重启后不生效 [[email protected] ~]# swapoff -a [[email protected] ~]# cp -p /etc/fstab /etc/fstab.bak$(date '+%Y%m%d%H%M%S') [[email protected] ~]# swapoff -a && sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab [[email protected] ~]# systemctl daemon-reload [[email protected] ~]# systemctl restart kubelet