-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
node level DNS may need override #284
Comments
cc @alejandrox1 I think we should probably add something about DNS mismatch to the known-issues.
Work around for the pod case is to configure the outer dind pod DNS to use upstream resolvers instead of the in-cluster resolvers. More general solution will probably require that kind support configuring node-level DNS options. |
I just hit this issue when trying to run https://github.com/kubernetes-incubator/metrics-server in a The metrics server tries to go to the kubelets via the node hostname and fails:
Would be nice if we could configure CoreDNS to resolve the node names. |
I had a similar problem where a pod in kind cluster could not resolve github.com. The reason seems to be that the default DNS server (8.8.8.8) is blocked in our network. After I added an /etc/docker/daemon.json to the kind node image with a dns entry including our dns the pod could resolve github.com. cf. https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/ |
@mikkeloscar that's an interesting problem, I wonder why metrics-server is using hostnames rather than going via the node IP 🤔 @swachter that's a good workaround, FYI though instead of editing etc/docker/daemon.json on the kind nodes for this you should be able to use one of these more portable options: https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/ |
for metrics server kubernetes-sigs/metrics-server#184 (comment) 🤔 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
In general the problem is knowing what to override with. Ideally the host's DNS should be suitable, the only recurring case is that of sticking kind in a kubernetes pod from another cluster. In this case you can configure DNS on that pod. It might be possible to create a wrapper script to detect the upstream DNS servers somehow and patch the dns config in the pod with this before running kind to make this more automatic, but for now we can just document this particular case (which is also the original in this issue) with #303 |
I mentioned this in slack some time back, but this seems like a good place to leave a note. When kind creates a node, it inherits the DNS configuration ( For example, if you start a kind cluster on your laptop, then switch to a different network, the DNS configuration on the kind nodes might not work anymore. In that case, you might see kubelet report errors pulling images, etc. This is not a kind bug, but a consequence of how Docker manages Having node level DNS override would also address this issue, I think. |
#1508 pretty much obviates this, instead docker's embedded DNS is made to work, which means that the host resolver is used by a docker DNS proxy socket for upstream requests. this also means the host etc/resolv.conf is not really picked up, instead the internal resolver is used |
should be fixed by #1508, no more awkard resolv.conf inheritance. |
cc @floreks
TLDR floreks had kind in dind on kubeadm, in which case the kind "node" DNS was not configured in a working way. We may need to allow DNS to be overridden at the node level to fix EG mage pulling
The text was updated successfully, but these errors were encountered: