Kubernetes Batch Operation Commands
· β 1 min read
1. Delete Pods in the Evicted State in Bulk 1 kubectl get pods --all-namespaces -o wide | grep Evicted | awk '{print $1,$2}' | xargs -L1 kubectl delete pod -n 2. Delete Pods in a Given State in a Given Namespace in Bulk Using field-selectors, you can delete Pods in a given state in a given namespace.