Skip to content

Instantly share code, notes, and snippets.

@liejuntao001
Last active June 22, 2021 16:50
Show Gist options
  • Save liejuntao001/a47c4b43555b43ef89aed0ad6455e931 to your computer and use it in GitHub Desktop.
Save liejuntao001/a47c4b43555b43ef89aed0ad6455e931 to your computer and use it in GitHub Desktop.
Delete multiple pods with similar names
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