问题描述
节点状态报告为unknown
"conditions": [
{
"type": "Ready",
"status": "Unknown",
"lastHeartbeatTime": "2015-11-12T06:03:19Z",
"lastTransitionTime": "2015-11-12T06:04:03Z",
"reason": "Kubelet stopped posting node status."
}
其中kubectl get nodes
返回NOTReady状态.这意味着什么,以及如何解决?
whle kubectl get nodes
return a NOTReady status. What does this imply and how to fix this?
推荐答案
获取节点
kubectl get nodes
结果:
NAME STATUS AGE
192.168.1.157 NotReady 42d
192.168.1.158 Ready 42d
192.168.1.159 Ready 42d
描述节点
这是192.168.1.157
节点上的未就绪.然后调试此尚未就绪的节点,您可以阅读正式文档-应用程序自检和调试.
Describe node
Here is a NotReady on the node of 192.168.1.157
. Then debugging this notready node, and you can read offical documents - Application Introspection and Debugging.
kubectl describe node 192.168.1.157
部分结果:
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
OutOfDisk Unknown Sat, 28 Dec 2016 12:56:01 +0000 Sat, 28 Dec 2016 12:56:41 +0000 NodeStatusUnknown Kubelet stopped posting node status.
Ready Unknown Sat, 28 Dec 2016 12:56:01 +0000 Sat, 28 Dec 2016 12:56:41 +0000 NodeStatusUnknown Kubelet stopped posting node status.
我的节点上有一个 OutOfDisk ,然后 Kubelet停止发布节点状态.因此,必须使用 Ubuntu14.04 上的df
命令释放一些磁盘空间,我可以检查内存的详细信息,并在docker rmi image_id/image_name命令>我可以删除无用的图像.
There is a OutOfDisk on my node, then Kubelet stopped posting node status.So, I must free some disk space, using the command of df
on my Ubuntu14.04 I can check the details of memory, and using the command of docker rmi image_id/image_name
under the role of su
I can remove the useless images.
使用 ssh (如ssh [email protected]
)登录192.168.1.157
,并通过sudo su
切换到"su";
Login in 192.168.1.157
by using ssh, like ssh [email protected]
, and switch to the 'su' by sudo su
;
/etc/init.d/kubelet restart
结果:
stop: Unknown instance:
kubelet start/running, process 59261
再次获取节点
在母版上:
Get nodes again
On the master:
kubectl get nodes
结果:
NAME STATUS AGE
192.168.1.157 Ready 42d
192.168.1.158 Ready 42d
192.168.1.159 Ready 42d
好的,那个节点工作正常.
Ok, that node works fine.
这里是参考: Kubernetes
这篇关于如何重启kubernetes节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!