kadet-hub logokadet-hub

Recipes / external-dns-powerdns

external-dns and PowerDNS on Kubernetes as one Kapitan recipe

A recipe is packed cargo for one app: inventory classes, ready to load.

external-dns writing a record for every annotated Service into a zone on a PowerDNS Authoritative Server, rendered by the kadet-hub kubernetes generator 1.14.0 from the external-dns project’s own Helm chart 1.23.0. PowerDNS is the included recipe powerdns.

1.0.2proof level deploys

  • Latest version: 1.0.2, published
  • Source chart: https://kubernetes-sigs.github.io/external-dns/external-dns:1.23.0@sha256:6d149b9b04db1dc9e46b3693a4eca4ac90d6bba5e3b2a0fdd067ce3f7bfbc31e
  • Proof level: deploys, compared with the chart by the kadet-hub/recipes CI
  • renders passed in the release run of with check 0.18.0, kind v0.33.0
  • Output capabilities: none
  • Inventory backends: omegaconf
  • Generators: kubernetes 1.14.0 sha256:787129e1eaed6b9bc868fe4c4aec58d40de6a89fc3cc08424a4cb5822b855080
  • Image security: grade D 28 findings, one per advisory and package, in the 1 image of version 1.0.2: CRITICAL 0, HIGH 6, MEDIUM 16, LOW 1, UNKNOWN 5. Scanned 2026-12-03 04:38 UTC. Full report
    The grade rates the upstream images the recipe pins, not the recipe: registry.k8s.io/external-dns/external-dns.

Replaces

This recipe replaces the external-dns-powerdns recipe of kadet-hub/examples, which stood in for Bitnami’s external-dns chart. Its PowerDNS part is the recipe powerdns, whose README lists the changes there. Moving from it changes these objects:

kadet-hub/examples This recipe
Deployment and ServiceAccount external-dns Deployment and ServiceAccount external-dns-powerdns
ClusterRole and ClusterRoleBinding dns-external-dns ClusterRole and ClusterRoleBinding external-dns-powerdns
ingresses readable, nodes only listed as the chart: no ingresses, nodes listed and watched
no Service Service external-dns-powerdns, port http 7979
no CRDs the chart’s CRDs dnsendpoints.externaldns.k8s.io and dnsrecords.externaldns.k8s.io
--pdns-server=http://powerdns.dns.svc:8081 --pdns-server=http://powerdns:8081, the Service in the target’s namespace
--domain-filter=example.internal applications.powerdns.zone, example.internal by default
UID and GID 65534 UID and GID 65532 with fsGroup 65534, as the chart sets them
readiness probe on /healthz readiness and liveness probes on /healthz

external-dns keeps its state in the zone. It marks each record it writes with a TXT record that carries --txt-owner-id=kadet-hub-recipe, the examples recipe’s owner ID, so the renamed Deployment takes the records over. Delete the examples Deployment, ServiceAccount, ClusterRole and ClusterRoleBinding first, so that only one external-dns syncs the zone.

What it deploys

  • recipes.external-dns-powerdns (init.yml)
  • recipes.external-dns-powerdns.external-dns-powerdns (external-dns-powerdns.yml): external-dns-powerdns

Required parameters

applications.powerdns.api_key, the key of PowerDNS’s HTTP API, which the included recipe powerdns requires. Set it as a ref with the backend of your choice. Without it the compile stops with Interpolation key 'applications.powerdns.api_key' not found.

Include

A target includes the recipe and its options as classes and can override anything the recipe sets:

classes:
  - recipes.external-dns-powerdns
parameters:
  namespace: dns
  kapitan:
    vars:
      target: external-dns-powerdns
  applications:
    powerdns:
      api_key: <ref>

Fetching it

The quickstart goes through these steps on a kind cluster with the uptime-kuma recipe, from installing Kapitan to the running app.

A separate fetch inventory pins the recipe by version and digest. This is fetch/targets/recipes.yml for version 1.0.2:

parameters:
  kapitan:
    dependencies:
      - type: oci
        source: ghcr.io/kadet-hub/recipes/external-dns-powerdns:1.0.2@sha256:2ab120529fdc3fbf3e9a0b2dc347990c2527bb4b37cab0d82e527460462aea0c
        output_path: inventory/classes/recipes/external-dns-powerdns

Version 1.0.2 includes powerdns 1.0.3. The consumer workflow adds the included recipes at the digests the index lists. Kapitan's --fetch reads no index, so for a local compile pull them by digest first:

tmp=$(mktemp -d)
oras pull -o "$tmp" ghcr.io/kadet-hub/recipes/powerdns@sha256:0a0798713b0aee64568de5c597eba2e162b8eefefee4326c5d93625173752de1
mkdir -p inventory/classes/recipes/powerdns
tar -xf "$tmp/powerdns.tar" -C inventory/classes/recipes/powerdns --no-same-owner
powerdns 1.0.3
sha256:0a0798713b0aee64568de5c597eba2e162b8eefefee4326c5d93625173752de1

The first command fetches the recipe into inventory/classes/recipes/external-dns-powerdns, the second the generators and compiles:

kapitan compile --inventory-path fetch --fetch --output-path .
kapitan compile --fetch

The first command exits with status 1 because the fetch target compiles nothing. Kapitan's --fetch checks neither the digest nor the attestation. This verifies the attestation of the recipe and of the recipes it includes:

gh attestation verify \
  oci://ghcr.io/kadet-hub/recipes/external-dns-powerdns@sha256:2ab120529fdc3fbf3e9a0b2dc347990c2527bb4b37cab0d82e527460462aea0c \
  --owner kadet-hub \
  --cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main

gh attestation verify \
  oci://ghcr.io/kadet-hub/recipes/powerdns@sha256:0a0798713b0aee64568de5c597eba2e162b8eefefee4326c5d93625173752de1 \
  --owner kadet-hub \
  --cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main

The attested index must also list each digest under its recipe with the pinned version, and not as yanked. Verifying by hand shows how to read it.

Settings

Chart value Inventory
image.tag components.external-dns-powerdns.image, tag and digest
domainFilters applications.powerdns.zone, which sets the zone of powerdns too
txtOwnerId components.external-dns-powerdns.args.txt-owner-id
policy components.external-dns-powerdns.args.policy
interval components.external-dns-powerdns.args.interval
logLevel, logFormat components.external-dns-powerdns.args.log-level, components.external-dns-powerdns.args.log-format
resources components.external-dns-powerdns.resources

args is a mapping, so a target replaces one argument by its key or drops it with ~.

external-dns reads the Services of every namespace. A Service with the annotation external-dns.kubernetes.io/hostname set to a name in the zone gets an A record with its cluster IP (--publish-internal-services). With --policy=sync it also deletes the records it owns once their Service is gone. Records without its TXT record stay. Two installations that write into one zone need different owner IDs.

The API key comes from the Secret powerdns, key api-key, and the API from the Service powerdns, both rendered by powerdns.

The CRDs DNSEndpoint and DNSRecord are the chart’s crds/, copied into vendor/ from the archive of the Source line, with the project’s Apache-2.0 license next to each. external-dns reads them only with --source=crd, which the recipe does not set.

Proof

check external-dns-powerdns --level deploys with tests/values.yaml and tests/target.yml on kind for each Kubernetes minor CI tests. The objects of powerdns are left out of the comparison and applied with the recipe. The Deployment and the Service select on name, the chart on app.kubernetes.io/name and instance. The ClusterRoleBinding is named external-dns-powerdns, the chart’s external-dns-powerdns-viewer. check compares what the ServiceAccount may do, not the names.

tests/smoke applies a Service annotated with web.example.internal and waits until PowerDNS answers its A record with the Service’s cluster IP through the Service powerdns, as the kadet-hub/examples check did.

Used in stacks

Versions

  • 1.0.2, : sha256:2ab120529fdc3fbf3e9a0b2dc347990c2527bb4b37cab0d82e527460462aea0c
  • 1.0.1, : sha256:d6661ecea51057afe500d854c514d869900f899539e8e9b87714563d2d4ffbf2
  • 1.0.0, : sha256:5e497b87ee50d7027666310355f5e12bb850c0d67f7e6a1d5ec2249843219fb3

The recipe's files are in kadet-hub/recipes. All recipes