Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not depend on clusterDomain == cluster.local #325

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

VannTen
Copy link

@VannTen VannTen commented Nov 25, 2024

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

While the default DNS domain of a Kubernetes cluster is 'cluster.local',
it can be changed.
Furthermore, container running in Kubernetes gets injected search
domains in their /etc/resolv.conf of the following form:

search .svc. svc.

This means a good way to be agnostic regarding the cluster DNS domain is
to simply not specify it.

The downside is that the number of DNS queries might increase, because
the search domains are tried in order (which is why "." is better
than "..svc").

Verification

N/A

While the default DNS domain of a Kubernetes cluster is 'cluster.local',
it can be changed.
Furthermore, container running in Kubernetes gets injected search
domains in their /etc/resolv.conf of the following form:

search <namespace>.svc.<cluster-domain> svc.<cluster-domain> <cluster-domain>

This means a good way to be agnostic regarding the cluster DNS domain is
to simply not specify it.

The downside is that the number of DNS queries might increase, because
the search domains are tried in order (which is why "<service>.<ns>" is better
than "<service>.<ns>.svc").

Signed-off-by: Max Gautier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant