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.
  1. In the left navigation pane, expand Credentials, click DNS Credentials, and then click Add Credentials.
  2. Select the Organization, and set Provider to PowerDNS.
  3. Enter the following values:
    Table 1. PowerDNS credential values
    FieldWhat to enter
    DNS Credentials NameA name of 3 to 30 characters. Use letters, digits, and dashes.
    DomainThe zone that Cloudera Cloud Factory manages, for example apps.example.com. Project host names become <project>.<domain>.
    API URLThe base URL of the API, without a path, for example https://pdns.example.com:8081. Do not add /api/v1.
    API KeyThe PowerDNS API key.
    Server IDOptional. The default is localhost, which is correct for almost every PowerDNS installation.

    The following screenshot shows the Add DNS Credentials drawer for PowerDNS. The values shown are examples.

    Figure 1. Add DNS Credentials drawer with the PowerDNS provider

    Add DNS Credentials drawer with PowerDNS as the provider and example values filled in
  4. Click Add credentials.

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-primary in the ccf-external-dns namespace. It uses the provider pdns, --pdns-server=<API URL>, --pdns-server-id (only when you set a server ID), --txt-wildcard-replacement=wildcard because PowerDNS rejects * in TXT names, --domain-filter=<credential domain>, and --policy=sync.
  • The key is stored in the secret external-dns-primary-creds (key api-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://host URL 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'