Skip to content

Instantly share code, notes, and snippets.

@Inquizarus
Last active February 5, 2019 06:39
Show Gist options
  • Save Inquizarus/952011524955650193eb7ea86c51dcb0 to your computer and use it in GitHub Desktop.
Save Inquizarus/952011524955650193eb7ea86c51dcb0 to your computer and use it in GitHub Desktop.
Small bash script to retrieve etcd node ip's
#!/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