Last active
June 17, 2023 14:31
-
-
Save baydakovss/0944441b547233f9b641cc604c3a28d7 to your computer and use it in GitHub Desktop.
How to list docker swarm nodes with labels
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
docker node ls -q | xargs docker node inspect -f '{{ .ID }} [{{ .Description.Hostname }}]: {{ .Spec.Labels }}' | |
docker node inspect --pretty swarm | |
ID: xa56lddvm1la1i8f444zw4mop | |
Labels: | |
- env=prod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment