A Kubernetes-native DNS controller that manages external DNS records using OctoDNS and CRDs
2.0K
A Kubernetes-native DNS controller that manages external DNS records idempotently using OctoDNS and CRDs.
Uses: https://github.com/octodns/octodns Code: https://gitlab.com/dsmpublic/octodnscontroller
Overview
octodnscontroler is a Kubernetes operator designed to manage DNS zones and records as native cluster objects. By wrapping OctoDNS, it allows you to control your DNS infrastructure through standard Kubernetes deployments, ensuring that the "entire-zone desired state" is maintained across various providers (e.g., DigitalOcean, RFC2136, PowerDNS).
It is particularly useful for Split-Horizon DNS setups and automating DNS updates for Blue-Green deployments. Key Features
CRD-Driven Management: Define OctoDNSProvider, OctoDNSZone, and OctoDNSRecordSet using YAML manifests.
Idempotency & Safety: Implements per-zone safety thresholds (maxChanges, maxDeletes) to prevent accidental mass record deletion.
Split-Horizon Support: Easily manage internal and external zones from distinct record sets within the same cluster.
Drift Correction: Periodically re-syncs zones to ensure the actual DNS provider state matches the Kubernetes CRD definitions.
Secret Integration: Securely maps Kubernetes Secrets to OctoDNS provider configurations.
Architecture
The controller follows a standard reconciliation loop:
Observe: Watches for changes in DNS-related CRDs and referenced Secrets.
Generate: Builds OctoDNS-compatible configuration and zone files dynamically.
Sync: Executes octodns-sync to apply the desired state to the provider.
Report: Updates the CRD status with the last sync time and result (success/failure).
apiVersion: dns.dsmouse.net/v1alpha1 kind: OctoDNSRecordSet metadata: name: example-records spec: zoneRef: dns-example-external records: www: ttl: 3600 A: ["192.0.2.10"]
Content type
Image
Digest
sha256:0a084ddbf…
Size
114.2 MB
Last updated
6 months ago
docker pull msmouse/octodnscontroller