Skip to content

Service mesh & networking: Consul

Consul commands from the Service mesh & networking folder.

Index
3 items

Consul: List cluster members

Safe

Agents in the cluster with status (alive, failed, left).

consul members
What each part does
  1. consul memberslist the agents in the gossip pool: node, address, status (alive / failed / left), type, datacenter

Also known as: consul members · agent failed

Consul: Look up a service via Consul DNS

Safe

Healthy instances and ports as Consul DNS returns them.

dig @127.0.0.1 -p 8600 <service>.service.consul SRV
What each part does
  1. digDNS lookup tool
  2. @127.0.0.1ask the local Consul agent instead of the system resolver
  3. -p 8600Consul's DNS port
  4. <service>.service.consulname of a registered service; only healthy instances are returned
  5. SRVrecord type: returns the port as well as the host

Also known as: service discovery · consul dns

Consul: Read a KV value

Safe

Read one key; add -recurse to dump a prefix.

consul kv get <key>
What each part does
  1. consul kv getread a value from Consul's key/value store
  2. <key>key path, e.g. config/app/db_url; add -recurse to read a whole prefix

Also known as: consul kv

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…