Clean evicted pods
kubectl get pods --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete pods \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -cClean dangling docker images.
A dangling image is one that is not tagged and is not referenced by any container.docker image prune -a -f --filter "until=24h"
No comments:
Post a Comment