Adding an RFC2136 (BIND) DNS credential

Add a DNS credential for a DNS server that accepts RFC2136 dynamic updates and TSIG-signed zone transfers.

  • The prerequisites in RFC2136 (BIND) DNS credentials: a zone, a TSIG key that the server accepts for updates and AXFR, port 53 open, and the IP address of the server.
  1. In the left navigation pane, expand Credentials and click DNS Credentials, and then click Add Credentials.
  2. Select RFC2136 (BIND) as the provider.
  3. Enter the values for the credential.
    Table 1. RFC2136 (BIND) credential fields
    FieldWhat to enter
    DNS Credentials NameA name of 3 to 30 characters. Use letters, digits, and dashes.
    DomainExactly the zone name that the server is authoritative for, for example apps.example.com. There is no separate zone field: Cloudera Cloud Factory uses this value as the zone. Project host names become <project>.<domain>.
    Name ServerThe IP address of the server. Only port 53 is supported. Leave out the port or enter :53.
    TSIG Key NameThe key name exactly as it is configured on the server.
    TSIG SecretThe base64 secret of the key.
    TSIG AlgorithmThe algorithm of the key. The default is hmac-sha256.

    The following screenshot shows the Add DNS Credentials drawer for RFC2136 (BIND). The values shown are examples.

    Figure 1. Add DNS Credentials drawer with the RFC2136 (BIND) provider

    Add DNS Credentials drawer with RFC2136 (BIND) as the provider and example values filled in
  4. Click Add credentials.

You cannot edit the TSIG key of a saved credential. To change it, see Rotating the TSIG key.

After you add the credential, enable DNS on a project and select the credential.

What Cloudera Cloud Factory sets up on the cluster

  • external-dns runs as the deployment external-dns-primary in the namespace ccf-external-dns. It uses the provider rfc2136 with the options --rfc2136-host=<IP>, --rfc2136-port=53, --rfc2136-zone=<domain>, --rfc2136-tsig-keyname, --rfc2136-tsig-secret-alg, --rfc2136-axfr, --domain-filter=<domain>, and --policy=sync. The TSIG secret is stored in the secret external-dns-primary-creds (key tsig-secret-key). The zone is the whole credential domain, not the subdomain of the project.
  • Each record gets a TXT ownership record with the owner ID of the project, named with an a- (A) or cname- (CNAME) prefix, for example "heritage=external-dns,external-dns/owner=ccf-<org>-<project>-<id>,external-dns/resource=ingress/<namespace>/<name>". external-dns changes or deletes only records that it owns. Projects that share a credential write into the same zone and are kept apart only by these owner IDs.
  • cert-manager, with Let's Encrypt, uses the rfc2136 DNS-01 solver with the same server and key.

Verifying that it works

Check that external-dns started and that AXFR and updates succeed, and ask the server directly for a record:

# external-dns started; AXFR and updates succeed
kubectl --context=<project> -n ccf-external-dns logs deploy/external-dns-primary | grep -i -E 'rfc2136|refused|notauth|error'

# the record, asked directly from the server
dig +short @<server-ip> <host>.<zone> A

Success looks like Configured RFC2136 with zones at start-up, followed by All records are already up to date. Records appear within one synchronization interval of about 1 minute after you create the Ingress, and are removed within one interval after you delete the source.