Skip to content

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]>
@kaznak
Copy link

kaznak commented Nov 10, 2025

I encountered the same issue related to the clustered domain that this PR addresses and created a simple patch to work around it:
kaznak@8882240

However, the approach in this PR looks much cleaner and more comprehensive than my quick fix, so I’d really like to see it merged.
Could you please share the current status of the review? I’d be happy to help if there’s anything I can do to move it forward.

Thank you for your time!

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.

2 participants