ExternalDNS Service
- Service Overview
- Alerts: https://alerts.gitlab.net/#/alerts?filter=%7Btype%3D%22external-dns%22%2C%20tier%3D%22sv%22%7D
- Label: gitlab-com/gl-infra/production~“Service::ExternalDNS”
Logging
Section titled “Logging”Operations
Section titled “Operations”ExternalDNS allows us to generate DNS records for k8s resources, simplifying references to them across our infrastructure
Infrastructure
Section titled “Infrastructure”ExternalDNS is deployed as a k8s workload configured in the gitlab-helmfiles repo. At the configured interval, it queries the Kubernetes API to retrieve resources with the relevant annotations and creates or updates DNS records for them. A Terraform module configures the GCP DNS zone and a service account with access to it.
Configuration
Section titled “Configuration”To instruct ExternalDNS to maintain a DNS record for a given k8s resource, annotate it with the key external-dns.alpha.kubernetes.io/hostname
; the value is the address you want to associate with that
resource. To avoid the risk of stale records (given propagation delay), stable IPs should be used. In GKE we can accomplish this by using Services
of type LoadBalancer
, and adding the ExternalDNS
annotation to that resource.
See https://github.com/kubernetes-sigs/external-dns/ for more details