The blog about containerisation, virtual machines and useful shell snippets and findings

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