diff --git a/local-cluster/configmap-coredns.yaml b/local-cluster/configmap-coredns.yaml new file mode 100644 index 0000000..31a8435 --- /dev/null +++ b/local-cluster/configmap-coredns.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: coredns + namespace: kube-system +data: + Corefile: | + .:53 { + errors + health { + lameduck 5s + } + ready + template ANY ANY local.lco.earth { + answer "{{ .Name }} 60 {{ .Class }} CNAME ingress-nginx-controller.ingress-nginx.svc.cluster.local" + } + kubernetes cluster.local in-addr.arpa ip6.arpa { + pods insecure + fallthrough in-addr.arpa ip6.arpa + ttl 30 + } + prometheus :9153 + forward . /etc/resolv.conf { + max_concurrent 1000 + } + cache 30 + loop + reload + loadbalance + } diff --git a/local-cluster/default.nix b/local-cluster/default.nix index 25ac144..0b6ed05 100644 --- a/local-cluster/default.nix +++ b/local-cluster/default.nix @@ -59,11 +59,13 @@ in { local-cluster-nginx-ingress-up.exec = '' set -ex -o pipefail kustomize build "${./ingress-nginx}" | kubectl apply -f - + kubectl apply -f "${./configmap-coredns.yaml}" ''; local-cluster-nginx-ingress-down.exec = '' set -ex -o pipefail kustomize build "${./ingress-nginx}" | kubectl delete -f - + kubectl delete -f "${./configmap-coredns.yaml}" ''; local-cluster-k8s-dashboard-up.exec = ''