delete all pods with regexp oneliner
kubectl get pods | awk '/podname/ { print $1 }' | xargs kubectl delete pod
Example explanation
- get all pods
- retrieve all pods under mask podname
- delete repeatedly
The blog about containerisation, virtual machines and useful shell snippets and findings