Feb 17, 2020, 11:55

delete all pods with regexp oneliner

kubectl get pods | awk '/podname/ { print $1 }' | xargs kubectl delete pod

Example explanation

  1. get all pods
  2. retrieve all pods under mask podname
  3. delete repeatedly
Share