Interview Prep/Networking/Kubernetes Networking

How do you automate DNS records for Kubernetes Ingress and Services?

IntermediateScenarioKubernetes Networking
Answer

Situation read → ExternalDNS watches resources and writes DNS records.

What I'd do →

  1. Install ExternalDNS with a role limited to the hosted zone
  2. Annotate the Service or use the Ingress host: external-dns.alpha.kubernetes.io/hostname: app.example.com
  3. Set --policy=upsert-only and --txt-owner-id=cluster-a to protect existing records
  4. Check kubectl logs deploy/external-dns and dig app.example.com
  5. Use a dedicated subdomain zone for the cluster

Why → Records follow the lifecycle of the Kubernetes objects, preventing stale entries.

Interview tip → Say TXT ownership records stop two clusters fighting over a name.

All Networking questions Roadmap: Networking for DevOps

More on Kubernetes Networking