# HG changeset patch # User drewp@bigasterisk.com # Date 1655584930 25200 # Node ID bc909bf8b80eebda7e3c15ce61da63bb964ed4f8 # Parent 3f7d4626234c820a03398786ad6a2698d2a4b0a4 another try at dns with /etc/k3s_resolv.conf diff -r 3f7d4626234c -r bc909bf8b80e coredns_freshen.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/coredns_freshen.sh Sat Jun 18 13:42:10 2022 -0700 @@ -0,0 +1,3 @@ +#!/bin/zsh +kubectl apply -f templates/kube/coredns.yaml +kubectl get -n kube-system configmap/coredns -o yaml diff -r 3f7d4626234c -r bc909bf8b80e kube.py --- a/kube.py Sat Jun 18 13:40:55 2022 -0700 +++ b/kube.py Sat Jun 18 13:42:10 2022 -0700 @@ -63,7 +63,12 @@ token=token, wg_ip=host.host_data['wireguard_address'], ) - + files.template( + src='templates/kube/k3s_resolv.conf.j2', + dest='/etc/k3s_resolv.conf', + master_ip=master_ip, + wg_ip=host.host_data['wireguard_address'], + ) files.template( src='templates/kube/k3s.service.j2', dest=f'/etc/systemd/system/{service_name}', diff -r 3f7d4626234c -r bc909bf8b80e templates/dnsmasq/dnsmasq.conf.j2 --- a/templates/dnsmasq/dnsmasq.conf.j2 Sat Jun 18 13:40:55 2022 -0700 +++ b/templates/dnsmasq/dnsmasq.conf.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -13,7 +13,7 @@ no-hosts addn-hosts=/opt/dnsmasq/{{ net }}/hosts local-ttl=30 -mx-host=bigasterisk.com,prime6.bigasterisk.com +mx-host=bigasterisk.com cache-size=10000 neg-ttl=60 dns-forward-max=1000 diff -r 3f7d4626234c -r bc909bf8b80e templates/kube/config.yaml.j2 --- a/templates/kube/config.yaml.j2 Sat Jun 18 13:40:55 2022 -0700 +++ b/templates/kube/config.yaml.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -1,4 +1,4 @@ -debug: true +debug: false write-kubeconfig-mode: '640' bind-address: 0.0.0.0 http-listen-port: 6443 diff -r 3f7d4626234c -r bc909bf8b80e templates/kube/k3s_resolv.conf.j2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/kube/k3s_resolv.conf.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -0,0 +1,6 @@ +# written by pyinfra + + +nameserver 10.5.0.1 +#options edns0 +search bigasterisk.com \ No newline at end of file diff -r 3f7d4626234c -r bc909bf8b80e templates/kube/node-config.yaml.j2 --- a/templates/kube/node-config.yaml.j2 Sat Jun 18 13:40:55 2022 -0700 +++ b/templates/kube/node-config.yaml.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -1,4 +1,6 @@ -#node-external-ip: {{ wg_ip }} +debug: false +node-external-ip: {{ wg_ip }} node-ip: {{ wg_ip }} token: {{ token }} -server: https://{{ master_ip }}:6443 \ No newline at end of file +server: https://{{ master_ip }}:6443 +resolv-conf: /etc/k3s_resolv.conf \ No newline at end of file