Skip to content

Instantly share code, notes, and snippets.

@chocobn69
Created August 23, 2018 07:55
Show Gist options
  • Save chocobn69/6f327f9720797d928195b8728bfbec88 to your computer and use it in GitHub Desktop.
Save chocobn69/6f327f9720797d928195b8728bfbec88 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
for service in $(docker service ls|awk -v N=2 '{print $N}')
do
echo "Rebalance $service"
docker service update --force $service
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment