Kubernetes 节点Node 一直处于 NotReady状态
配置了一个Kubernetes集群做试验。虚拟机移动后一个节点一直处于Not Ready 状态。重启后仍为恢复。查看Kubernetes节点状态kubectl get node -o wide显示如下NAMESTATUSROLESAGEVERSIONINTERNAL-IPEXTERNAL-IPOS-I...
·
配置了一个Kubernetes集群做试验。虚拟机移动后一个节点一直处于Not Ready 状态。重启后仍为恢复。
查看Kubernetes节点状态
kubectl get node -o wide
显示如下
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
vddall-k8s-master-01 Ready <none> 16d v1.14.2 192.168.127.115 <none> CentOS Linux 7 (Core) 4.4.219-1.el7.elrepo.x86_64 docker://18.9.6
vddall-k8s-node-01 NotReady <none> 16d v1.14.2 192.168.127.116 <none> CentOS Linux 7 (Core) 4.4.219-1.el7.elrepo.x86_64 docker://18.9.6
vddall-k8s-node-02 Ready <none> 16d v1.14.2 192.168.127.117 <none> CentOS Linux 7 (Core) 4.4.219-1.el7.elrepo.x86_64 docker://18.9.6
1. 查看 kubelet状态
systemctl statsu kubelet
显示如下
kubelet.service - Kubernetes Kubelet
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2020-05-08 07:33:35 CST; 3s ago
ause-amd64:3.1 --image-pull-progress-deadline=15m --volume-plugin-dir=/data/k8s/k8s/kubelet/kubelet-plugins/volume/exec/ --logtostderr=true --v=2 (code=exited, status=255)
2. journalctl -u 查看系统日志
journalctl -u kubelet
failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false.
kubelet.service: main process exited, code=exited, status=255/n/a
- 关闭Swap
swapoff -a
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
在查看kubelet状态
systemctl statsu kubele
● kubelet.service - Kubernetes Kubelet
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-05-08 07:40:03 CST; 14s ago
4.再查看Kubernetes节点状态,恢复正常
kubectl get node -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
vddall-k8s-master-01 Ready <none> 16d v1.14.2 192.168.127.115 <none> CentOS Linux 7 (Core) 4.4.219-1.el7.elrepo.x86_64 docker://18.9.6
vddall-k8s-node-01 Ready <none> 16d v1.14.2 192.168.127.116 <none> CentOS Linux 7 (Core) 4.4.219-1.el7.elrepo.x86_64 docker://18.9.6
vddall-k8s-node-02 Ready <none> 16d v1.14.2 192.168.127.117 <none> CentOS Linux 7 (Core) 4.4.219-1.el7.elrepo.x86_64 docker://18.9.6
更多推荐
已为社区贡献2条内容
所有评论(0)