Adding a Cloudflare DNS credential
Create an API token in Cloudflare, and then add it as a DNS credential in Cloudera Cloud Factory.
- The DNS preview feature is turned on.
- You have Manager group access in the organization, the Domain Owner or Domain Admin role, or the Admin role.
- You have an active Cloudflare zone and permission to create API tokens for it.
The credential appears on the DNS Credentials page. When you enable DNS on a project with this credential, Cloudera Cloud Factory sets up the following on the project cluster:
- external-dns runs as the deployment
external-dns-primaryin theccf-external-dnsnamespace. It uses the providercloudflare, the option--domain-filter=<credential domain>, and the option--policy=sync. The token is stored in the secretexternal-dns-primary-creds(keyapi-token) and reaches the pod as theCF_API_TOKENenvironment variable. The records that external-dns creates are DNS-only, not proxied. - With a Let's Encrypt profile, cert-manager uses the
cloudflareDNS-01 solver with the same token. The token is stored in the secretcloudflare-api-token-secretin theccf-cert-managernamespace, and the cluster issuer isccf-default.
To change the token later, delete the credential and add it again. Then enable DNS on a project and continue with the certificate and trust profile. For the order of these steps, see Requirements and setup order.
To check that external-dns works, run the following commands:
# external-dns started without errors
kubectl --context=<project> -n ccf-external-dns logs deploy/external-dns-primary | grep -i -E 'cloudflare|error|403'
# public resolution
dig +short <host>.<zone> @1.1.1.1
