Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Minikube version (use minikube version): v0.20.0
Environment:
cat ~/.minikube/machines/minikube/config.json | grep DriverName): virtualboxcat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): file://C:/cygwin64/home/b26978/.minikube/cache/iso/minikube-v0.20.0.isoWhat happened:
When I create a new minikube using minikube start the DNS configuration inside the minikube VM doesn't use the same DNS search domain as the host uses. I'm behind a corporate firewall and the proxy hostname isn't resolvable from inside the VM, thus the http_proxy and https_proxy settings are useless.
Apparently the DNS system is managed by systemd-resolved, and the configuration file at used is located at: /etc/systemd/resolved.conf. The Domains settings inside is commented in my configuration. I managed to get the DNS (and proxy) working by setting the Domains value in the /etc/systemd/resolved.conf and restarting the service:
systemctl daemon-reload
systemctl restart systemd-resolved
Sadly, I'm not fluent in Go and I'm not able to submit a patch to fix the issue.
What you expected to happen:
The configuration file (/etc/systemd/resolved.conf) contains the Domains settings and it's set to the correct value.
How to reproduce it (as minimally and precisely as possible):
Set the DNS domain search to something (non empty) under Windows 7. Create a new minikube vm using minikube start.
Anything else do we need to know:
To automate this setup, you can add a scrip to modify the resolved.conf to bootlocal.sh. bootlocal.sh is a script that runs each time minikube starts. If more users request this we can try to make this a flag option to pass these settings.
I forked the project and added a new flag to the minikube start command in order to set the DNS search domain. Would you consider accepting it as a PR? I'm new to go lang so I'm open to suggestions.
Has this been merged?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
If you can't automatically propagate the dns search value from the host to the minikube vm (and ultimately the kubernetes pods), it seems some idea like this should a reasonable work around. Any reason it's not merged?
@jhgoodwin - To my knowledge, this hasn't been merged because no one has proposed a PR to merge. That said, help wanted!
@tstromberg I'll read https://github.com/kubernetes/minikube/blob/master/docs/contributors/README.md (and related) when I get a chance. I have a feeling all environments aren't necessarily created equal, but I'd love to see this propagate a little better so your minikube looks more like the host it runs on by default.
I'll also test the commits from @talberto in his fork, since he never sent a PR for it:
https://github.com/talberto/minikube/commits/dns-search-domain
This sounds like a good idea and I would be happy to review any PR's that add it. Help wanted!
Most helpful comment
To automate this setup, you can add a scrip to modify the resolved.conf to bootlocal.sh. bootlocal.sh is a script that runs each time minikube starts. If more users request this we can try to make this a flag option to pass these settings.