Skip to content

Setup External DNS

external-dns provisions DNS records based on the host information. This project will setup and manage records in Route 53 that point to controller deployed ALBs.


Role Permissions

Adequate roles and policies must be configured in AWS and available to the node(s) running the external-dns. See


  1. Download sample external-dns manifest

  2. Edit the --domain-filter flag to include your hosted zone(s)

    The following example is for a hosted zone

    - --source=service
    - --source=ingress
    - # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
    - --provider=aws
    - --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
    - --aws-zone-type=public # only look at public hosted zones (valid values are public, private or no value for both)
    - --registry=txt
    - --txt-owner-id=my-identifier
  3. Deploy external-dns

    kubectl apply -f external-dns.yaml
  4. Verify it deployed successfully.

    kubectl logs -f $(kubectl get po | egrep -o 'external-dns[A-Za-z0-9-]+')

    Should display output similar to the following:

    time="2019-12-11T10:26:05Z" level=info msg="config: {Master: KubeConfig: RequestTimeout:30s IstioIngressGateway:istio-system/istio-ingressgateway Sources:[service ingress] Namespace: AnnotationFilter: FQDNTemplate: CombineFQDNAndAnnotation:false Compatibility: PublishInternal:false PublishHostIP:false ConnectorSourceServer:localhost:8080 Provider:aws GoogleProject: DomainFilter:[] ZoneIDFilter:[] AlibabaCloudConfigFile:/etc/kubernetes/alibaba-cloud.json AlibabaCloudZoneType: AWSZoneType:public AWSAssumeRole: AWSBatchChangeSize:4000 AWSBatchChangeInterval:1s AWSEvaluateTargetHealth:true AzureConfigFile:/etc/kubernetes/azure.json AzureResourceGroup: CloudflareProxied:false InfobloxGridHost: InfobloxWapiPort:443 InfobloxWapiUsername:admin InfobloxWapiPassword: InfobloxWapiVersion:2.3.1 InfobloxSSLVerify:true DynCustomerName: DynUsername: DynPassword: DynMinTTLSeconds:0 OCIConfigFile:/etc/kubernetes/oci.yaml InMemoryZones:[] PDNSServer:http://localhost:8081 PDNSAPIKey: PDNSTLSEnabled:false TLSCA: TLSClientCert: TLSClientCertKey: Policy:upsert-only Registry:txt TXTOwnerID:my-identifier TXTPrefix: Interval:1m0s Once:false DryRun:false LogFormat:text MetricsAddress::7979 LogLevel:info TXTCacheInterval:0s ExoscaleEndpoint: ExoscaleAPIKey: ExoscaleAPISecret: CRDSourceKind:DNSEndpoint ServiceTypeFilter:[] RFC2136Host: RFC2136Port:0 RFC2136Zone: RFC2136Insecure:false RFC2136TSIGKeyName: RFC2136TSIGSecret: RFC2136TSIGSecretAlg: RFC2136TAXFR:false}"
    time="2019-12-11T10:26:05Z" level=info msg="Created Kubernetes client"


  1. To create a record set in the subdomain, from your ingress which has been created by the ingress-controller, simply add the following annotation in the ingress object specification and apply the manifest:

    annotations: alb internet-facing
      # for creating record-set # give your domain name here
  2. Similar entries should appear in the ExternalDNS pod log:

    time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE A"
    time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE TXT"
    time="2019-12-11T10:26:08Z" level=info msg="2 record(s) in zone were successfully updated"