From 13b84e6824de5265f42123400fb8a5324910f471 Mon Sep 17 00:00:00 2001 From: Oleksii Prudkyi Date: Sat, 27 Nov 2021 18:36:48 +0200 Subject: [PATCH] Clarify configuration of Network Manager Details for ingress-dns setup on Linux with Network Manager verified on openSUSE Leap 15.3 NetworkManager 1.22.10 Dnsmasq version 2.86 --- .../en/docs/handbook/addons/ingress-dns.md | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/site/content/en/docs/handbook/addons/ingress-dns.md b/site/content/en/docs/handbook/addons/ingress-dns.md index 6406b6b2a8..491b3bb571 100644 --- a/site/content/en/docs/handbook/addons/ingress-dns.md +++ b/site/content/en/docs/handbook/addons/ingress-dns.md @@ -61,6 +61,8 @@ minikube addons enable ingress-dns {{% tabs %}} {{% linuxtab %}} +## Linux OS with resolvconf + Update the file `/etc/resolvconf/resolv.conf.d/base` to have the following contents. ``` @@ -86,15 +88,34 @@ If your Linux OS does not use `systemctl`, run the following commands. See https://linux.die.net/man/5/resolver -When you are using Network Manager with the `dnsmasq` plugin, you can add an additional configuration file, but you need -to restart NetworkManager to activate the change. +## Linux OS with Network Manager + +Network Manager can run integrated caching DNS server - `dnsmasq` plugin and can be configured to use separate nameservers per domain. + +Edit /etc/NetworkManager/NetworkManager.conf and set `dns=dnsmasq` + +``` +[main] +dns=dnsmasq +``` +Also see `dns=` in [NetworkManager.conf](https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html). + +Configure dnsmasq to handle .test domain ```bash +sudo mkdir /etc/NetworkManager/dnsmasq.d/ echo "server=/test/$(minikube ip)" >/etc/NetworkManager/dnsmasq.d/minikube.conf -systemctl restart NetworkManager.service ``` -Also see `dns=` in [NetworkManager.conf](https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html). +Restart Network Manager +``` +systemctl restart NetworkManager.service +``` +Ensure your /etc/resolv.conf contains only single nameserver +```bash +cat /etc/resolv.conf | grep nameserver +nameserver 127.0.0.1 +``` {{% /linuxtab %}}