Last active
February 5, 2019 06:39
-
-
Save Inquizarus/952011524955650193eb7ea86c51dcb0 to your computer and use it in GitHub Desktop.
Small bash script to retrieve etcd node ip's
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
#!/bin/bash | |
curl --silent "https://discovery.etcd.io/$1" | \ | |
jq '.node.nodes | map(.value)' | \ | |
grep -oE '([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment