Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

kubectl delete pods wildcard

$ kubectl get pods -n default --no-headers=true | awk '/web-app/{print $1}'| xargs  kubectl delete -n default podpod "web-app-7fb4f5bff9-8crgx" deletedpod "web-app-7fb4f5bff9-ftzfd" deletedpod "web-app-7fb4f5bff9-rrkt2" deleted
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #kubectl #delete #pods #wildcard
ADD COMMENT
Topic
Name
4+1 =