Skip to content

Instantly share code, notes, and snippets.

@sashman
sashman / consulkv
Last active February 1, 2017 09:59 — forked from progrium/consulkv
Consul KV client, depends on jq
#!/bin/bash
# Usage
# consulkv service-url servicename servicetag
CONSUL="localhost:8500"
main() {
case "$1" in
info)
curl -s "$CONSUL/v1/kv/$2" | jq -r .[]