Skip to content

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Page as Markdown

External DNS

Automatic DNS management for agentgateway

External DNS automatically manages DNS records for Kubernetes resources. Use it to automatically create DNS records for agentgateway endpoints.

Why use External DNS with agentgateway?

  • Automatic DNS - DNS records created automatically from Gateway/Service resources
  • Multiple providers - AWS Route53, Google Cloud DNS, Cloudflare, Azure DNS, and more
  • Sync on change - Records updated when resources change
  • TTL management - Configurable DNS TTL

Before you begin

Install External DNS for your cloud provider. Example for AWS Route53:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
spec:
  selector:
    matchLabels:
      app: external-dns
  template:
    metadata:
      labels:
        app: external-dns
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: registry.k8s.io/external-dns/external-dns:v0.14.0
        args:
        - --source=gateway-httproute
        - --provider=aws
        - --aws-zone-type=public
        - --registry=txt
        - --txt-owner-id=my-cluster

Gateway API integration

External DNS can read hostnames from Gateway resources:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: agentgateway
spec:
  gatewayClassName: agentgateway
  listeners:
  - name: https
    protocol: HTTPS
    port: 443
    hostname: "ai.example.com"  # External DNS creates this record

External DNS automatically:

  1. Watches for Gateway resources
  2. Extracts the hostname
  3. Creates/updates DNS records pointing to the Gateway’s external IP

HTTPRoute hostnames

External DNS also reads hostnames from HTTPRoute:

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: ai-api
  annotations:
    external-dns.alpha.kubernetes.io/hostname: api.example.com
spec:
  parentRefs:
  - name: agentgateway
  hostnames:
  - "api.example.com"
  rules:
  - backendRefs:
    - name: agentgateway
      port: 3000

Annotations

Control External DNS behavior with annotations:

metadata:
  annotations:
    # Set specific hostname
    external-dns.alpha.kubernetes.io/hostname: ai.example.com
    # Set TTL
    external-dns.alpha.kubernetes.io/ttl: "300"
    # Use specific target
    external-dns.alpha.kubernetes.io/target: 1.2.3.4

Provider examples

Cloudflare

args:
- --source=gateway-httproute
- --provider=cloudflare
- --cloudflare-proxied  # Enable Cloudflare proxy
env:
- name: CF_API_TOKEN
  valueFrom:
    secretKeyRef:
      name: cloudflare-credentials
      key: api-token

Google Cloud DNS

args:
- --source=gateway-httproute
- --provider=google
- --google-project=my-project

Azure DNS

args:
- --source=gateway-httproute
- --provider=azure
- --azure-resource-group=my-rg
- --azure-subscription-id=my-sub-id

Learn more

Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.