Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

DNS tries to resolve kube-spawn... to external + root nameserver #296

Open
donbowman opened this issue Aug 9, 2018 · 2 comments
Open

DNS tries to resolve kube-spawn... to external + root nameserver #296

donbowman opened this issue Aug 9, 2018 · 2 comments

Comments

@donbowman
Copy link
Contributor

donbowman commented Aug 9, 2018

Somewhere there is a hardcoded 8.8.8.8 (because this is not my machines DNS).

I am seeing an A-record lookup for kube-spawn-...worker (no domain).
This goes to 8.8.8.8.
This is then forwarded to a.root-servers.net, which responds NXDOMAIN
this is repeated for AAAA

to avoid this I think the master should maybe have /etc/hosts filled in w/ the workers name + IP.

$ machinectl list
MACHINE                          CLASS     SERVICE        OS      VERSION  ADDRESSES
kube-spawn-flannel-master-wm9g3x container systemd-nspawn flatcar 1828.0.0 10.22.0.149...
kube-spawn-flannel-worker-matpk7 container systemd-nspawn flatcar 1828.0.0 10.22.0.148...
kube-spawn-flannel-worker-o5xape container systemd-nspawn flatcar 1828.0.0 10.22.0.146...
kube-spawn-flannel-worker-zdt5mu container systemd-nspawn flatcar 1828.0.0 10.22.0.147...

4 machines listed.
$ sudo machinectl shell kube-spawn-flannel-master-wm9g3x
Connected to machine kube-spawn-flannel-master-wm9g3x. Press ^] three times within 1s to exit session.
Update Strategy: No Reboots
Failed Units: 1
  systemd-networkd-wait-online.service
kube-spawn-flannel-master-wm9g3x ~ # host kube-spawn-flannel-worker-matpk7
Host kube-spawn-flannel-worker-matpk7 not found: 3(NXDOMAIN)
kube-spawn-flannel-master-wm9g3x ~ # logout
Connection to machine kube-spawn-flannel-master-wm9g3x terminated.

shows the problem.

perhaps the --resolv-conf= switch to systemd-nspawn

@dongsupark
Copy link
Member

Oh, I missed this issue.
Yeah you're right. We have a hard-coded DNS server:
https://github.com/kinvolk/kube-spawn/blob/v0.3.0/pkg/cluster/cluster.go#L284
I agree, at least we should provided ways for users to configure the DNS server, via cmdline parameter or a config file.

@donbowman
Copy link
Contributor Author

the issue is the node-names we create. they need to be locally resolvable. Since we made them, its insufficient to allow local dns server.
otherwise we are hammering the root name servers (a.root-servers.net etc) w/ unresolvable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants