Adding a PowerDNS DNS credential
Add a PowerDNS API key as a DNS credential so that Cloudera Cloud Factory can create DNS records in a PowerDNS zone.
- 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 a zone on your PowerDNS server, the PowerDNS API is enabled, and you have an API key.
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 providerpdns,--pdns-server=<API URL>,--pdns-server-id(only when you set a server ID),--txt-wildcard-replacement=wildcardbecause PowerDNS rejects*in TXT names,--domain-filter=<credential domain>, and--policy=sync. - The key is stored in the secret
external-dns-primary-creds(keyapi-key) and reaches the pod as an environment variable, never on the command line. - The external-dns network policy allows egress to the port in the API URL, or to 8081 if the URL has no port. A plain
http://hostURL without a port uses port 80, which is not opened. Always give the port explicitly.
Continue with the certificate and trust profile, and choose a Self-Signed or Customer-Provided CA 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 'pdns|error'
# records in the zone (from a host that can reach the API)
curl -s -H "X-API-Key: $PDNS_API_KEY" https://pdns.example.com:8081/api/v1/servers/localhost/zones/<zone>. | jq '.rrsets[].name'
