Last active
May 27, 2020 10:59
-
-
Save panzelva/4bb4db7f550f3743846ef67dabc68429 to your computer and use it in GitHub Desktop.
Kubernetes
This file contains hidden or 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
| #!/bin/bash | |
| # create temporary debug pod with network tools (ubuntu based) | |
| kubectl run --rm debug -it --generator=run-pod/v1 --image arunvelsriram/utils bash | |
| # create temporary debug pod with network tools (alpine based) | |
| kubectl run --rm debug -it --generator=run-pod/v1 --image praqma/network-multitool sh | |
| # delete all Errored pods in namespace | |
| # WARNING! destructive | |
| kubectl get pods --namespace gitlab-runners --no-headers=true | awk '$3 ~ /Error/' | awk '{print $1}' | xargs kubectl delete --namespace gitlab-runners pod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment