diff --git a/CHANGES.md b/CHANGES.md index bde308e12..8be93d1fa 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,11 @@ Notable changes between versions. * Require `terraform-provider-azurerm` v1.17+ (action required) * Add `primary` field to `ip_configuration` needed by v1.17+ ([#331](https://github.com/poseidon/typhoon/pull/331)) +#### DigitalOcean + +* Add AAAA DNS records resolving to worker nodes ([#333](https://github.com/poseidon/typhoon/pull/333)) + * Hosting IPv6 apps requires editing nginx-ingress with `hostNetwork: true` + #### Addons * Configure Heapster to scrape Kubelets with bearer token auth ([#323](https://github.com/poseidon/typhoon/pull/323)) diff --git a/digital-ocean/container-linux/kubernetes/outputs.tf b/digital-ocean/container-linux/kubernetes/outputs.tf index 3f8608afc..eaade7048 100644 --- a/digital-ocean/container-linux/kubernetes/outputs.tf +++ b/digital-ocean/container-linux/kubernetes/outputs.tf @@ -3,7 +3,8 @@ output "controllers_dns" { } output "workers_dns" { - value = "${digitalocean_record.workers.0.fqdn}" + # Multiple A and AAAA records with the same FQDN + value = "${digitalocean_record.workers-record-a.0.fqdn}" } output "controllers_ipv4" { diff --git a/digital-ocean/container-linux/kubernetes/workers.tf b/digital-ocean/container-linux/kubernetes/workers.tf index 36818487d..73559ca2f 100644 --- a/digital-ocean/container-linux/kubernetes/workers.tf +++ b/digital-ocean/container-linux/kubernetes/workers.tf @@ -1,5 +1,5 @@ # Worker DNS records -resource "digitalocean_record" "workers" { +resource "digitalocean_record" "workers-record-a" { count = "${var.worker_count}" # DNS zone where record should be created @@ -11,6 +11,18 @@ resource "digitalocean_record" "workers" { value = "${element(digitalocean_droplet.workers.*.ipv4_address, count.index)}" } +resource "digitalocean_record" "workers-record-aaaa" { + count = "${var.worker_count}" + + # DNS zone where record should be created + domain = "${var.dns_zone}" + + name = "${var.cluster_name}-workers" + type = "AAAA" + ttl = 300 + value = "${element(digitalocean_droplet.workers.*.ipv6_address, count.index)}" +} + # Worker droplet instances resource "digitalocean_droplet" "workers" { count = "${var.worker_count}" diff --git a/docs/addons/ingress.md b/docs/addons/ingress.md index 66ad9a0b0..88059d570 100644 --- a/docs/addons/ingress.md +++ b/docs/addons/ingress.md @@ -4,7 +4,7 @@ Nginx Ingress controller pods accept and demultiplex HTTP, HTTPS, TCP, or UDP tr ## AWS -On AWS, a network load balancer (NLB) distributes traffic across a target group of worker nodes running an Ingress controller deployment. Security group rules allow traffic to ports 80 and 443. Health checks ensure only workers with a healthy Ingress controller receive traffic. +On AWS, a network load balancer (NLB) distributes TCP traffic across two target groups (port 80 and 443) of worker nodes running an Ingress controller deployment. Security groups rules allow traffic to ports 80 and 443. Health checks ensure only workers with a healthy Ingress controller receive traffic. Create the Ingress controller deployment, service, RBAC roles, RBAC bindings, default backend, and namespace. @@ -37,7 +37,7 @@ resource "google_dns_record_set" "some-application" { ## Azure -On Azure, a load balancer distributes traffic across a backend pool of worker nodes running an Ingress controller deployment. Security group rules allow traffic to ports 80 and 443. Health probes ensure only workers with a healthy Ingress controller receive traffic. +On Azure, a load balancer distributes traffic across a backend address pool of worker nodes running an Ingress controller deployment. Security group rules allow traffic to ports 80 and 443. Health probes ensure only workers with a healthy Ingress controller receive traffic. Create the Ingress controller deployment, service, RBAC roles, RBAC bindings, default backend, and namespace. @@ -101,7 +101,7 @@ resource "google_dns_record_set" "some-application" { ## Digital Ocean -On Digital Ocean, a DNS A record (e.g. `nemo-workers.example.com`) resolves to each worker[^1] running an Ingress controller DaemonSet on host ports 80 and 443. Firewall rules allow IPv4 and IPv6 traffic to ports 80 and 443. +On Digital Ocean, DNS A and AAAA records (e.g. FQDN `nemo-workers.example.com`) resolve to each worker[^1] running an Ingress controller DaemonSet on host ports 80 and 443. Firewall rules allow IPv4 and IPv6 traffic to ports 80 and 443. Create the Ingress controller daemonset, service, RBAC roles, RBAC bindings, default backend, and namespace. @@ -124,6 +124,9 @@ resource "google_dns_record_set" "some-application" { } ``` +!!! note + Hosting IPv6 apps is possible, but requires editing the nginx-ingress addon to use `hostNetwork: true`. + [^1]: Digital Ocean does offer load balancers. We've opted not to use them to keep the Digital Ocean setup simple and cheap for developers. ## Google Cloud