External DNS

Kubernetes' internal DNS / service-discovery means that every service is resolvable within the cluster. You can create a Wordpress pod with a database URL pointing to "mysql", and trust that it'll find the service named "mysql" in the same namespace. (Or "mysql.weirdothernamespace" if you prefer)


This is a companion discussion topic for the original entry at https://geek-cookbook.funkypenguin.co.nz/kubernetes/external-dns/

External-DNS repo explained in the external-dns section doesn’t seem to be working anymore

  url: https://charts.bitnami.com/bitnami

Doesn’t seem to resolve anymore?

I was actually able to get it working like this

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: external-dns
  namespace: flux-system
spec:
  type: oci
  interval: 15m
  url: oci://registry-1.docker.io/bitnamicharts

But when I try to define DNSEndpoints it fails

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: harbor
  namespace: harbor
spec:
  endpoints:
  - dnsName: harbor
    recordTTL: 180
    recordType: A
    targets:
    - 10.0.0.222

with

# flux reconcile kustomization -n flux-system external-dns
► annotating Kustomization external-dns in flux-system namespace
✔ Kustomization annotated
◎ waiting for Kustomization reconciliation
✗ Kustomization reconciliation failed: DNSEndpoint/harbor/harbor dry-run failed, error: no matches for kind "DNSEndpoint" in version "externaldns.k8s.io/v1alpha1"

Looks like you don’t have the ExternalDNS CRDs installed… try deleting and recreating the helmrelease after having set:

    crd:
      ## Install and use the integrated DNSEndpoint CRD
      create: true

Yup! This was it! Thanks for the input!!