Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

should consul have any port? #74

Open
bravowhale-jenkins opened this issue Mar 17, 2016 · 3 comments
Open

should consul have any port? #74

bravowhale-jenkins opened this issue Mar 17, 2016 · 3 comments

Comments

@bravowhale-jenkins
Copy link

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 ?

@mhamann
Copy link

mhamann commented Apr 18, 2017

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.

@Theaxiom
Copy link
Contributor

Thanks @mhamann 👍

@thomasvincent
Copy link
Contributor

can this be closed out and or added to the wiki?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants