節點資源耗盡狀態
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閥值