From 0fcff061db8255e26c82bb7b17a19e3eecbe6ad8 Mon Sep 17 00:00:00 2001 From: Arthur Zapparoli <2992+arthurgeek@users.noreply.github.com> Date: Tue, 11 Jul 2023 20:44:05 +0200 Subject: [PATCH] Move certificate switch in README after DNS (#844) --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 5a5f4ff2..76d55408 100644 --- a/README.md +++ b/README.md @@ -401,6 +401,25 @@ task cluster:resources [direnv](https://direnv.net/) will make it so anytime you `cd` to your repo's directory it export the required environment variables (e.g. `KUBECONFIG`). To set this up make sure you [hook it into your shell](https://direnv.net/docs/hook.html) and after that is done, run `direnv allow` while in your repos directory. +### 🌐 DNS + +The `external-dns` application created in the `networking` namespace will handle creating public DNS records. By default, `echo-server` and the `flux-webhook` are the only public sub-domains exposed. In order to make additional applications public you must set an ingress annotation (`external-dns.alpha.kubernetes.io/target`) like done in the `HelmRelease` for `echo-server`. + +For split DNS to work it is required to have `${SECRET_DOMAIN}` point to the `${K8S_GATEWAY_ADDR}` load balancer IP address on your home DNS server. This will ensure DNS requests for `${SECRET_DOMAIN}` will only get routed to your `k8s_gateway` service thus providing **internal** DNS resolution to your cluster applications/ingresses from any device that uses your home DNS server. + +For and example with Pi-Hole apply the following file and restart dnsmasq: + +```sh +# /etc/dnsmasq.d/99-k8s-gateway-forward.conf +server=/${SECRET_DOMAIN}/${K8S_GATEWAY_ADDR} +``` + +Now try to resolve an internal-only domain with `dig @${pi-hole-ip} hajimari.${SECRET_DOMAIN}` it should resolve to your `${INGRESS_NGINX_ADDR}` IP. + +If having trouble you can ask for help in [this](https://github.com/onedr0p/flux-cluster-template/discussions/719) Github discussion. + +If nothing is working, that is expected. This is DNS after all! + ### 📜 Certificates By default this template will deploy a wildcard certificate with the Let's Encrypt staging servers. This is to prevent you from getting rate-limited on configuration that might not be valid on bootstrap using the production server. Once you have confirmed the certificate is created and valid, make sure to switch to the Let's Encrypt production servers as outlined below. Do not enable the production certificate until you are sure you will keep the cluster up for more than a few hours. @@ -452,25 +471,6 @@ By default this template will deploy a wildcard certificate with the Let's Encry You should start to see your applications using the new certificate. -### 🌐 DNS - -The `external-dns` application created in the `networking` namespace will handle creating public DNS records. By default, `echo-server` and the `flux-webhook` are the only public sub-domains exposed. In order to make additional applications public you must set an ingress annotation (`external-dns.alpha.kubernetes.io/target`) like done in the `HelmRelease` for `echo-server`. - -For split DNS to work it is required to have `${SECRET_DOMAIN}` point to the `${K8S_GATEWAY_ADDR}` load balancer IP address on your home DNS server. This will ensure DNS requests for `${SECRET_DOMAIN}` will only get routed to your `k8s_gateway` service thus providing **internal** DNS resolution to your cluster applications/ingresses from any device that uses your home DNS server. - -For and example with Pi-Hole apply the following file and restart dnsmasq: - -```sh -# /etc/dnsmasq.d/99-k8s-gateway-forward.conf -server=/${SECRET_DOMAIN}/${K8S_GATEWAY_ADDR} -``` - -Now try to resolve an internal-only domain with `dig @${pi-hole-ip} hajimari.${SECRET_DOMAIN}` it should resolve to your `${INGRESS_NGINX_ADDR}` IP. - -If having trouble you can ask for help in [this](https://github.com/onedr0p/flux-cluster-template/discussions/719) Github discussion. - -If nothing is working, that is expected. This is DNS after all! - ### 🤖 Renovatebot [Renovatebot](https://www.mend.io/free-developer-tools/renovate/) will scan your repository and offer PRs when it finds dependencies out of date. Common dependencies it will discover and update are Flux, Ansible Galaxy Roles, Terraform Providers, Kubernetes Helm Charts, Kubernetes Container Images, and more!