Last active
April 16, 2020 10:26
-
-
Save srkiNZ84/6131ee2c9c747fc8f4ed211af9e77099 to your computer and use it in GitHub Desktop.
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 | |
KUBECOMMAND="kubectl --kubeconfig ~/.kube/mycluster --namespace dev" | |
for each in $($KUBECOMMAND get deployments -o jsonpath="{.items[*].metadata.name}" | tr " " "\n" | grep -v tiller-deploy); | |
do | |
#kubectl delete ns $each | |
echo "Deleting deployment $each" | |
$KUBECOMMAND delete deployment $each | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment