improve linux section of ingress-dns documentation
parent
f2049f0d30
commit
f72619a476
|
@ -61,6 +61,14 @@ minikube addons enable ingress-dns
|
|||
{{% tabs %}}
|
||||
{{% linuxtab %}}
|
||||
|
||||
On Linux, you should identify your domain name resolver configuration, and update its configuration accordingly. To that end, look at the first lines of `/etc/resolv.conf`:
|
||||
|
||||
- if it mentions `resolvconf`, resolution is likely handled by **resolvconf**,
|
||||
- if it is `# Generated by NetworkManager`, resolution is handled by **NetworkManager**,
|
||||
- if it similar to `# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8)`, resolution is handled by **systemd-resolved**.
|
||||
|
||||
Start minikube, and apply the configuration below matching your system configuration.
|
||||
|
||||
## Linux OS with resolvconf
|
||||
|
||||
Update the file `/etc/resolvconf/resolv.conf.d/base` to have the following contents.
|
||||
|
@ -71,7 +79,7 @@ nameserver 192.168.99.169
|
|||
timeout 5
|
||||
```
|
||||
|
||||
Replace `192.168.99.169` with your `minikube ip`.
|
||||
Replace `192.168.99.169` with the output of `minikube ip`.
|
||||
|
||||
If your Linux OS uses `systemctl`, run the following commands.
|
||||
|
||||
|
@ -88,30 +96,35 @@ If your Linux OS does not use `systemctl`, run the following commands.
|
|||
|
||||
See https://linux.die.net/man/5/resolver
|
||||
|
||||
## 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.
|
||||
## Linux OS with NetworkManager
|
||||
|
||||
Edit /etc/NetworkManager/NetworkManager.conf and set `dns=dnsmasq`
|
||||
NetworkManager can run integrated caching DNS server - `dnsmasq` plugin and can be configured to use separate nameservers per domain.
|
||||
|
||||
Edit `/etc/NetworkManager/NetworkManager.conf` and enable `dns=dnsmasq` by adding:
|
||||
|
||||
```
|
||||
[main]
|
||||
dns=dnsmasq
|
||||
```
|
||||
|
||||
Also see `dns=` in [NetworkManager.conf](https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html).
|
||||
|
||||
Configure dnsmasq to handle .test domain
|
||||
Configure dnsmasq to handle domain names ending with `.test`:
|
||||
|
||||
```bash
|
||||
sudo mkdir /etc/NetworkManager/dnsmasq.d/
|
||||
sudo mkdir -p /etc/NetworkManager/dnsmasq.d/
|
||||
echo "server=/test/$(minikube ip)" | sudo tee /etc/NetworkManager/dnsmasq.d/minikube.conf
|
||||
```
|
||||
|
||||
Restart Network Manager
|
||||
Restart Network Manager:
|
||||
|
||||
```
|
||||
systemctl restart NetworkManager.service
|
||||
```
|
||||
Ensure your /etc/resolv.conf contains only single nameserver
|
||||
|
||||
Ensure your `/etc/resolv.conf` contains only single nameserver:
|
||||
|
||||
```bash
|
||||
cat /etc/resolv.conf | grep nameserver
|
||||
nameserver 127.0.0.1
|
||||
|
@ -119,8 +132,6 @@ nameserver 127.0.0.1
|
|||
|
||||
## Linux OS with systemd-resolved
|
||||
|
||||
Your Linux OS likely uses `systemd-resolved` if the first line of `/etc/resolv.conf` contains `This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8)`.
|
||||
|
||||
Run the following commands to add the minikube DNS for `.test` domains:
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in New Issue