This is a cache of https://docs.okd.io/latest/networking/external_dns_operator/understanding-external-dns-operator.html. It is a snapshot of the page at 2024-11-16T18:32:18.180+0000.
Understanding the External <strong>dns</strong> Operator - External <strong>dns</strong> Operator | Networking | OKD 4
×

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

External dns Operator

The External dns Operator implements the External dns API from the olm.openshift.io API group. The External dns Operator updates services, routes, and external dns providers.

Prerequisites
  • You have installed the yq CLI tool.

Procedure

You can deploy the External dns Operator on demand from the OperatorHub. Deploying the External dns Operator creates a Subscription object.

  1. Check the name of an install plan by running the following command:

    $ oc -n external-dns-operator get sub external-dns-operator -o yaml | yq '.status.installplan.name'
    Example output
    install-zcvlr
  2. Check if the status of an install plan is Complete by running the following command:

    $ oc -n external-dns-operator get ip <install_plan_name> -o yaml | yq '.status.phase'
    Example output
    Complete
  3. View the status of the external-dns-operator deployment by running the following command:

    $ 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

Viewing 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 by running the following command:

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

External dns Operator domain name limitations

The External dns Operator uses the TXT registry which adds the prefix for TXT records. This reduces the maximum length of the domain name for 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, a dns record of <domain_name_from_source> results in a TXT record of external-dns-<record_type>-<domain_name_from_source>.

The domain name of the dns records generated by the 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

The following error appears in the External dns Operator logs if the generated domain name exceeds any of the domain name limitations:

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"