should consul have any port?
bravowhale-jenkins opened this issue · 3 comments
i build consul in docker ,and run it on marathon, i'm a little confused ,should consul expose some port like mesos-dns , and should i change the /etc/resolve.conf ,point the nameserver to consul's IP ,
and i see consul-temples the command like this
$ consul-template
-consul 127.0.0.1:8500
-template "/tmp/template.ctmpl:/var/www/nginx.conf:service nginx restart"
-retry 30s
-once
is the port 8500 belong to consul ?
Yes, port 8500 belongs to Consul's REST API. It also optionally exposes a DNS listener in port 8600. You can use that to do things like DNS SRV requests to get host/port info for deployed services.
If you want to use Consul DNS, then you should deploy dnsmasq
, point /etc/resolv.conf
to the dnsmasq ip / port, and then set up dnsmasq to use consul's port 8600 to route all service.consul.
domains to that DNS server, leaving all of the other DNS requests alone.
can this be closed out and or added to the wiki?