This is a cache of https://docs.openshift.com/container-platform/4.11/networking/external_dns_operator/understanding-external-dns-operator.html. It is a snapshot of the page at 2024-11-18T14:07:47.523+0000.
Understanding the External <strong>dns</strong> Operator - External <strong>dns</strong> Operator | Networking | OpenShift Container Platform 4.11
×

The External dns Operator deploys and manages Externaldns to provide the name resolution for services and routes from the external dns provider to OpenShift Container Platform.

External dns Operator

The External dns Operator implements the External dns API from the olm.openshift.io API group. The External dns Operator deploys the Externaldns using a deployment resource. The Externaldns deployment watches the resources such as services and routes in the cluster and updates the external dns providers.

Procedure

You can deploy the Externaldns Operator on demand from the OperatorHub, this creates a Subscription object.

  1. Check the name of an install plan:

    $ oc -n external-dns-operator get sub external-dns-operator -o yaml | yq '.status.installplan.name'
    Example output
    install-zcvlr
  2. Check the status of an install plan, the status of an install plan must be Complete:

    $ oc -n external-dns-operator get ip <install_plan_name> -o yaml | yq '.status.phase'
    Example output
    Complete
  3. Use the oc get command to view the Deployment status:

    $ oc get -n external-dns-operator deployment/external-dns-operator
    Example output
    NAME                    READY     UP-TO-DATE   AVAILABLE   AGE
    external-dns-operator   1/1       1            1           23h

External dns Operator logs

You can view External dns Operator logs by using the oc logs command.

Procedure
  1. View the logs of the External dns Operator:

    $ oc logs -n external-dns-operator deployment/external-dns-operator -c external-dns-operator

External dns Operator domain name limitations

External dns Operator uses the TXT registry, which follows the new format and adds the prefix for the TXT records. This reduces the maximum length of the domain name for the TXT records. A dns record cannot be present without a corresponding TXT record, so the domain name of the dns record must follow the same limit as the TXT records. For example, dns record is <domain-name-from-source> and the TXT record is external-dns-<record-type>-<domain-name-from-source>.

The domain name of the dns records generated by External dns Operator has the following limitations:

Record type Number of characters

CNAME

44

Wildcard CNAME records on Azuredns

42

A

48

Wildcard A records on Azuredns

46

If the domain name generated by External dns exceeds the domain name limitation, the External dns instance gives the following error:

$ oc -n external-dns-operator logs external-dns-aws-7ddbd9c7f8-2jqjh (1)
1 The external-dns-aws-7ddbd9c7f8-2jqjh parameter specifies the name of the External dns pod.
Example output
time="2022-09-02T08:53:57Z" level=info msg="Desired change: CREATE external-dns-cname-hello-openshift-aaaaaaaaaa-bbbbbbbbbb-ccccccc.test.example.io TXT [Id: /hostedzone/Z06988883Q0H0RL6UMXXX]"
time="2022-09-02T08:53:57Z" level=info msg="Desired change: CREATE external-dns-hello-openshift-aaaaaaaaaa-bbbbbbbbbb-ccccccc.test.example.io TXT [Id: /hostedzone/Z06988883Q0H0RL6UMXXX]"
time="2022-09-02T08:53:57Z" level=info msg="Desired change: CREATE hello-openshift-aaaaaaaaaa-bbbbbbbbbb-ccccccc.test.example.io A [Id: /hostedzone/Z06988883Q0H0RL6UMXXX]"
time="2022-09-02T08:53:57Z" level=error msg="Failure in zone test.example.io. [Id: /hostedzone/Z06988883Q0H0RL6UMXXX]"
time="2022-09-02T08:53:57Z" level=error msg="InvalidChangeBatch: [FATAL problem: DomainLabelTooLong (Domain label is too long) encountered with 'external-dns-a-hello-openshift-aaaaaaaaaa-bbbbbbbbbb-ccccccc']\n\tstatus code: 400, request id: e54dfd5a-06c6-47b0-bcb9-a4f7c3a4e0c6"