k8s中node节点资源不足

节点资源耗尽状态

1、查看节点组件的状态
2、查看节点上pod的状态

查看日志内容发现如下内容:
1、Node emay-CMPP01 status is now: NodeHasDiskPressure
2、Warning: “EvictionThresholdMet Attempting to reclaim nodefs”
从以上内容大致可以判断出node3处于磁盘空间不足的状态下,并且该node上的kubelet daemon判断达到了Eviction阀值,试图回收磁盘空间(通过某种杀Pod的方式来缓解资源不足)。

查看service的状态

journalctl  -u kubelet -f
1月 14 09:50:55 ubuntu-k8s-3 kubelet[17144]: W1016 09:50:55.056703   17144 eviction_manager.go:331] eviction manager: attempting to reclaim nodefs
1月 14 09:50:55 ubuntu-k8s-3 kubelet[17144]: I1016 09:50:55.057322   17144 eviction_manager.go:345] eviction manager: must evict pod(s) to reclaim nodefs
1月 14 09:50:55 ubuntu-k8s-3 kubelet[17144]: E1016 09:50:55.058307   17144 eviction_manager.go:356] eviction manager: eviction thresholds have been met, but no pods are active to evict

kubelet日志也印证了上面的判断:node因为磁盘不足不再参与pod调度,但尝试回收磁盘空间时却发现已经没有active pod可以kill了!

解决:
1、可以扩大磁盘(我们采用此方案)
2、更改Eviction阀值

posted @ 2020-01-14 14:31  ainimore  阅读(6183)  评论(0编辑  收藏  举报