0

I've got a zone .default.svc.cluster.local with a separate server for it, but I don't want to type all that.

Instead, I want to type XXX.localhost to get to the XXX.default.svc.cluster.local.

I've been thinking of using naptr-record of dnsmasq for that, but its syntax drives me mad. What should I do?

akond
  • 111
  • 3

1 Answers1

1

A common solution is to configure your systems with an (extra) search domain.

The domain search list is used by a resolver to create a fully qualified domain name (FQDN) from a relative name, i.e. when you type somehost and that can't be foun (there is for example no such entry in your hosts file) the resolver will attempt to find if a somehost.default.svc.cluster.local. FQDN exists by appending the default.svc.cluster.local search domain. If it does it will behave as if you had entered somehost.default.svc.cluster.local.

The relative name can't contain a . dot and a domain search list with multiple domains may not always work as you'd hope either.


Regarding your use of .local DNS name:

  • if you want to obfuscate your domain use the reserved example.com. or similar domains.

  • Please do not use the .local TLD your for internal DNS records, but only for its intended purpose.

  • For internal DNS records, please use a subdomain under your own domain, (or a dedicated domain you actually own) instead.

  • Do not add '.local' to your search domain

Bob
  • 5,805
  • 7
  • 25