2021-11-17 23:29:14 +07:00
|
|
|
# DNS setup
|
|
|
|
|
2021-11-28 12:12:53 +07:00
|
|
|
Because everyone DNS setup is different, DNS automation is not in the scope of the project.
|
|
|
|
|
2021-11-17 23:29:14 +07:00
|
|
|
Some options for DNS config:
|
|
|
|
|
|
|
|
- Change the DNS config in your router
|
|
|
|
- Run your own DNS server in the cluster
|
|
|
|
- Change the DNS config in your domain registrar
|
|
|
|
|
|
|
|
For example here is my set up using the third option with Cloudflare, automated using Terraform:
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
resource "cloudflare_record" "homelab_records" {
|
|
|
|
for_each = toset([
|
|
|
|
"*.knative",
|
|
|
|
"argocd",
|
|
|
|
"dex",
|
|
|
|
"git",
|
|
|
|
"grafana",
|
|
|
|
"tekton",
|
|
|
|
"vault",
|
|
|
|
# etc.
|
|
|
|
])
|
|
|
|
|
|
|
|
zone_id = cloudflare_zone.khuedoan_com.id
|
|
|
|
type = "A"
|
|
|
|
name = each.key
|
2021-11-28 12:12:53 +07:00
|
|
|
value = "192.168.1.150" # NGINX LoadBalancer IP
|
2021-11-17 23:29:14 +07:00
|
|
|
ttl = 1 # Auto
|
|
|
|
}
|
|
|
|
```
|