Score:0

How to dynamically resolve domains?

gb flag

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?

Score:1
cn flag
Bob

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

akond avatar
gb flag
`local` domain is used by kubernetes cluster. i don't think i can change that.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.