amenasse / antkube

Artifacts for my personal Kubernetes cluster
1 stars 0 forks source link

Configure coredns to point to local dns service #12

Open amenasse opened 4 years ago

amenasse commented 4 years ago

As described in https://github.com/amenasse/antkube/issues/5#issuecomment-671688548_, coredns has been configured to point to a local dns server by editing the configmap.

           fallthrough
         }
         prometheus :9153
-        forward . /etc/resolv.conf
+        forward . 192.168.0.107
         cache 30
         loop
         reload

This works :tada: but will need to be done in a repeatable manner. Restarting k3s will revert to the old coredns map.

amenasse commented 4 years ago

CoreDNS will be configured to use the nameservers configured on the node (/etc/resolv.conf)

https://rancher.com/docs/rancher/v2.x/en/troubleshooting/dns/#check-upstream-nameservers-in-resolv-conf

The real:tm: solution is to get a decent setup that features a dns server that allows zones to be administered or a dhcp server that can be configured to advertise my preferred dns server. Suprisingly my old router which was found on the side of the street during council rubbish pickup doesn't seem to offer this basic functionality.