Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Velotio - HashiCorp Consul Part 2 - Discovering MongoDB Primary node from Django container
root@82857c424b15:/web/tweeter# dig @127.0.0.1 mongo-primary.service.consul
; <<>> DiG 9.10.3-P4-Debian <<>> @127.0.0.1 mongo-primary.service.consul
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8369
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mongo-primary.service.consul. IN A
;; ANSWER SECTION:
mongo-primary.service.consul. 0 IN A 33.10.0.3
;; ADDITIONAL SECTION:
mongo-primary.service.consul. 0 IN TXT "consul-network-segment="
;; Query time: 139 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 01 11:50:45 UTC 2019
;; MSG SIZE rcvd: 109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment