NotReady
If a Kubernetes node is notReady, it means that the node is not able to perform its intended functions and is not available for scheduling new workloads. There are several reasons why a node may be notReady, including:
-
Network issues: If the node loses its network connectivity, it may become notReady.
-
Resource exhaustion: If the node runs out of resources like CPU or memory, it may become notReady.
-
Node failure: If the node crashes or experiences hardware failure, it may become notReady.
-
Kubernetes component failure: If a critical Kubernetes component like kubelet or kube-proxy fails on the node, it may become notReady.
To troubleshoot a notReady node, you can:
-
Check the node status using the kubectl command:
kubectl get nodes
-
Check the node logs using the kubectl command:
kubectl describe <node-name>
kubectl describe node > node.log -
Check the kubelet logs on the node:
journalctl -xeu kubelet
journalctl -xeu kubelet > kubelet.log | systemctl status kubelet -
Check the system logs on the node:
/var/log/messages
-
Check the Kubernetes event logs using the kubectl command:
kubectl get events
-
Check the docker and : systemctl status docker && systemctl status containerd | more
Once you identify the root cause of the notReady node, you can take appropriate actions to resolve the issue. For example, if the node is notReady due to resource exhaustion, you can add more resources or adjust the resource limits for the workloads running on the node. If the node is notReady due to network issues, you can troubleshoot the network connectivity and fix any issues.
Case @1
Issues
处理方案:
systemctl restart kubelet
Case @2
controller.go:178] failed to update node lease, error: etcdserver: request timed out
request timed out
Case @ 3
container runtime status check may not have completed yet.
https://github.com/kubernetes/kubernetes/issues/101056
原因:
容器把docker搞崩了,然后节点就异常了!
处理方案:
for p in $(docker ps -q); do echo inspecting $p; docker inspect $p; echo complete; done;
ps -ef | grep 最后的id
kill 掉该进程
Case @4
Warning InvalidDiskCapacity 101s kubelet invalid capacity 0 on image filesystem
解决方案:systemctl restart containerd
Case @5
文章来源:https://www.toymoban.com/news/detail-416943.html
原因:改节点时间和其他节点时间不一致导致。文章来源地址https://www.toymoban.com/news/detail-416943.html
到了这里,关于k8s node NotReady的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!