I’m depending on consul DNS resolution more and more for service name and service discovery and distribution.
I’m trying to POC a tighter integration into my DNS infrastructure
Started off with a basic forward to the default consul domain
# consul service description
zone "consul" IN {
type forward;
forward only;
forwarders { 127.0.0.1 port 8600; };
so the bind server forwards anything .consul to the agent running on itself which can then resolve all the services consul has discovered.
Updated the config to integrate into the actual top level domain, removing the default consul domain
I have working a basic DNS forwarder to a subdomain which they forwards to consuls service DNS
eg:
Top level domain, test.com
Bind forwarder
# consul service description
zone "disovery.test.com" IN {
type forward;
forward only;
forwarders { 127.0.0.1 port 8600; };
same concept as before, bind server forwards it to it’s local agent, so I can now do someservice.service.datacentre_name.discovery.test.com and it will resolve the nodes consul is aware of.
what I’d like to do is remove the “discovery” part of this domain as it’s just an un-needed subdomain
so I’d like to forward to consul_data_centre_name.test.com
but I don’t think
# consul service description
zone "datacentre_name.test.com" IN {
type forward;
forward only;
forwarders { 127.0.0.1 port 8600; };
will actually work
first of all is this pattern sane/good to use data_centre_name as the seperator to the consul hosted dns records
if not - what is the right pattern to use
secondly is it as simple as just specifying the name of the datacentre as the forwarder ?