Last active
June 22, 2021 16:50
-
-
Save liejuntao001/a47c4b43555b43ef89aed0ad6455e931 to your computer and use it in GitHub Desktop.
Delete multiple pods with similar names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl -n <namespace> get pod | awk '{print $1}' | grep <pod name pattern> | tr '\n' ' ' | xargs kubectl -n <namespace> delete pod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment