Last active
April 20, 2020 04:55
-
-
Save zawyelwin/d216d1a15e4f6358d8e71482b219eef3 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
for ns in $(kubectl get ns --no-headers | awk '{print $1}'); | |
do for deploy in $(kubectl -n $ns get deploy --no-headers --ignore-not-found | awk '{print $1}'); | |
do kubectl -n $ns scale deploy $deploy --replicas=1; done; | |
done; |
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
for ns in $(kubectl get ns --no-headers | awk '{print $1}'); | |
do for sts in $(kubectl -n $ns get sts --no-headers --ignore-not-found | awk '{print $1}'); | |
do kubectl -n $ns scale sts $sts --replicas=1; done; | |
done; |
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
for i in $(kubectl get deploy -n namespace | awk '{print $1}'); do kubectl scale --replicas=1 deploy -n namespace $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment