Created
June 2, 2023 21:02
-
-
Save getaaron/7f2cd500e4eaf6405c7809e4688ae6e1 to your computer and use it in GitHub Desktop.
Restart multiple Kubernetes deployments by tag
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
# If you want to restart all k8s deployments by label (e.g. where appname=foo, team=bar, and environ=baz), you can | |
kubectl get deployments --selector=appname=foo,team=bar,environ=baz | tail -n +2 | cut -d ' ' -f 1 | xargs kubectl rollout restart deployment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment