Troubleshooting Cloudflare DNS credentials

Find the cause of Cloudflare credential check failures and external-dns errors, and review the known limitations.

Troubleshooting

Messages that appear when you save the credential start with Cloudflare credential check failed:.

Table 1. Cloudflare credential problems
Message or symptomCause and fix
API token was rejected (401).The token is wrong, revoked, or expired. Use an API token, not the global API key.
No Cloudflare zone found for '<domain>'.The domain is not exactly the zone name, or the token is not allowed on that zone.
Zone <id> does not match domain '<domain>'.The zone ID belongs to another zone.
Zone lookup returned HTTP 403.The token lacks the Zone > Zone > Read permission on the zone.
external-dns is in CrashLoopBackOff with 403 Forbidden or 9109 Invalid access token, and the project goes to Failure.The token was revoked, expired, or lacks the Zone > DNS > Edit permission. Create a new token, add a new DNS credential, enable DNS with it, and then use Repair on the project. Every project that uses the same credential is affected. For more information, see The project fails after you enable DNS.

Known limitations

  • To rotate the token, delete the DNS credential and add it again. Projects keep the old token until you enable DNS again with the new credential.
  • You cannot configure proxied (orange-cloud) records.
  • Disabling DNS on a project leaves the records that the project created in the zone. Before you disable DNS, delete the project's Ingresses, Services, and DNSEndpoints, and wait a minute so that external-dns removes its own records. You must delete records that remain after disabling by hand, because a later enable uses a new owner ID and does not recognize them.