feat: add Kubernetes cheatsheet for pod cleanup commands

This commit is contained in:
Nawaz Dhandala 2025-10-15 12:30:34 +01:00
parent 7e887bd4cd
commit 94dacc20db
No known key found for this signature in database
GPG key ID: 96C5DCA24769DBCA

View file

@ -0,0 +1,11 @@
# Kubernetes Cheatsheet
### Cleanup
Delete Evited, Error or ContainerStatusUnknown Pods
```bash
kubectl get pods --field-selector=status.phase=Failed | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
kubectl get pods --field-selector=status.phase=Failed | grep Error | awk '{print $1}' | xargs kubectl delete pod
kubectl get pods --field-selector=status.phase=Failed | grep ContainerStatusUnknown | awk '{print $1}' | xargs kubectl delete pod
```