This file contains 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
# based on the "patch deployment" strategy in this comment: | |
# https://github.com/kubernetes/kubernetes/issues/13488#issuecomment-372532659 | |
# requires jq | |
# $1 is a valid namespace | |
function refresh-all-pods() { | |
echo | |
DEPLOYMENT_LIST=$(kubectl -n $1 get deployment -o json|jq -r .items[].metadata.name) | |
echo "Refreshing pods in all Deployments" | |
for deployment_name in $DEPLOYMENT_LIST ; do |