kubectl 不会删除 Status:Failed 和 Reason:Evicted 状态的 pod ,因此选择 k8s CronJob 定时删除这些 pod $ vim01-sa.yaml apiVersion:v1 kind:Namespace metadata:name:delete-evicted-pods---apiVersion:v1 kind:ServiceAccount metadata:name:delete-evicted-podsnamespace:delete-evicted-pods $ vim02-cr.yam...
k8s 批量清理Evicted 的pod kubectl -n NameSpace get pods | grep Evicted |awk '{print$1}'|xargs kubectl -n NameSpace delete pods