adamant-kite-43734
10/18/2022, 11:24 AMancient-raincoat-46356
10/18/2022, 3:40 PMkubectl delete pod $(kubectl get pods | egrep 'Completed|Error|ContainerStatusUnknown' | awk '{print $1}')
You can edit the egrep
to remove only what you want and you can add --all-namespaces
to affect pods outside of your current namespace context