InfraPub 为您找到相关结果 2

k8s 中发现很多为状态为 Evicted 的 Pod

背景 在查看k8s的环境的时候,突然发现存在n多个pod状态为Evicted。差不多得有几百个。 解决 同事愉快的丢了个链接给我,让我自己看一波:What will happen to evicted pods in kubernetes? 查看了一下pod的信息。结果发现是磁盘满了。 kubectl describe pod {pode_name} -n {namespace} 但是得手动删除Evicted状态的pod kubectl get pods --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted...阅读全文

博文 2021-03-05 08:34:20 diablo4

kubelet 中垃圾回收机制的设计与实现

状态,则调用 cgc.removeOldestN 回收 pod 中的所有容器。deleted 状态指 pod 已经被删除或者其 status.phase 为 failed 且其 status.reason 为 evicted 或者 pod.deletionTimestamp != nil 且 pod 中所有容器的 status 为 terminated 或者 waiting 状态,terminated 状态指 pod 处于 Failed 或者 succeeded 状态;3、对于非 deleted 或者 terminated 状态的 pod,调用 cgc.enforceMaxContainersPerEvictUnit 为其保留 MaxPerPodContainer 个已经退出的容器,按照容器...阅读全文

博文 2021-02-05 17:48:22 知乎