dns-stack

by QuenchWorks

Helm chartv0.0.18App 1.0.0Apache-2.0Verified publisher

Self-hosted DNS for Kubernetes: PowerDNS Authoritative serves the zones and external-dns writes records into it from annotated Services and Ingresses, through the PowerDNS API with a key the stack generates. All QuenchWorks images are nonroot, CVE-gated, pinned by digest and cosign-signed.

About this chart

Quenchworks dns-stack

Self-hosted DNS for Kubernetes in one install: PowerDNS Authoritative serves the zones, and external-dns writes records into it from annotated Services and Ingresses. All images are QuenchWorks builds: nonroot, CVE-gated, pinned by digest and cosign-signed.

ComponentChartName in the cluster
PowerDNS Authoritative 5.1.4powerdns 0.0.2dns-powerdns (DNS), dns-powerdns-api (API)
external-dns 0.23.0external-dns 0.0.7dns-external-dns

Install

helm install dns oci://ghcr.io/quenchworks/charts/dns-stack -n dns --create-namespace

The stack generates one PowerDNS API key (Secret dns-stack-pdns-api), which both sides read. A post-install Job creates the zones in zones (default k8s.internal), since external-dns only writes records inside existing zones.

Publish a name

kubectl annotate service web external-dns.kubernetes.io/hostname=web.k8s.internal

Within a minute the record is served on port 53 of dns-powerdns. ClusterIP Services get records too (--publish-internal-services). With policy: sync, deleting the Service deletes its record; the ownership TXT record (external-dns/owner=dns-stack) keeps that to records this stack created.

To make Pods resolve the zone, forward it to dns-powerdns from CoreDNS.

Values

KeyDefaultDescription
zones[k8s.internal]Zones the Job creates. Keep external-dns.domainFilters in sync
powerdns.*see chartPassed to the powerdns chart (service.type, persistence, ...)
external-dns.*see chartPassed to the external-dns chart (sources, policy, ...)
zoneJob.imagebusybox 1.38.0 by digestImage for the zone Job

The external-dns 0.23 annotation prefix is external-dns.kubernetes.io/. For resources still annotated with external-dns.alpha.kubernetes.io/, add --enable-legacy-annotation-prefix to external-dns.extraArgs.

Deploy dns-stack with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dns-stack on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdns-stack is pinned at v0.0.18 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply