Overview
By default, Control Plane issues domain certificates from Let’s Encrypt. A certificate generator replaces that with an ACME certificate authority of your choice, such as a commercial CA that your organization requires. A certificate generator is an org-level resource. It holds the CA’s ACME directory URL, the account credentials, and how ACME challenges are solved. A domain uses it by settingspec.certificateGeneratorLink. Many domains can share one generator.
Configuration
The only supported provider isacme.
spec.provider, spec.acme.server, and the challenge type identify the ACME account. To change any of them, create a new certificate generator and point your domains at it.
Challenge types
An
http01 generator is rejected on a domain that:
- uses
dnsMode: ns, - sets
gvcLink(subdomain-based routing needs a wildcard certificate), or - sets
workloadLink.
HTTP-01
The CA validates the domain by requesting a token over HTTP on the domain itself. No credentials are needed:DNS-01
The CA validates the domain through a TXT record at_acme-challenge.<domain>. The provider decides where Control Plane writes that record:
cpln(the default): in Control Plane’s own DNS. Each domain delegates the record with one CNAME. No credentials are needed.route53,cloudDns,azureDns, orcloudflare: in your DNS zone, using credentials you provide in a secret.
cpln)
cpln takes no other settings. Each CNAME-mode domain that uses the generator needs this record, which is also listed in the domain’s status.dnsConfig:
It is the same record the built-in
dns01 challenge uses, so a domain moving from the built-in challenge to a cpln generator keeps it. Domains with dnsMode: ns need no extra record, except replica-direct domains (workloadLink), which always need it.
Your CA must follow the CNAME when it looks up the TXT record. Most public CAs do; confirm with yours.
provider and the matching block:
- When
hostedZoneIdorhostedZoneNameis omitted, the zone is discovered from the domain name. - For
route53, if theawssecret setsroleArn, that role is assumed before records are changed. azureDnssupports the Azure public cloud only.
_acme-challenge CNAME record. When switching a domain from the built-in dns01 challenge or a cpln generator to one of these providers, delete that CNAME record: a TXT record cannot be created at a name that already has a CNAME.
dns01.provider and its settings can be changed after creation, unlike spec.provider, spec.acme.server, and the challenge type. Re-apply the full generator with cpln apply so the previous provider’s block is removed. The records each domain needs change with it, as listed in the domain’s status.dnsConfig.
External account binding
Commercial CAs usually issue a key ID and an HMAC key for each ACME account. Store the HMAC key in anopaque secret exactly as the CA issued it (base64url), with encoding plain, and reference it:
Secrets
Every secret a generator references must exist and have the type listed above. Creating or updating a generator requires theuse permission on each referenced secret. A secret that a certificate generator references cannot be deleted.
Example
A DNS-01 generator for a commercial CA, with credentials for Route53:- YAML
- JSON
cpln apply:
Using a generator on a domain
SetcertificateGeneratorLink on the domain:
- The generator defines the challenge type, so the domain must not set
certChallengeType. - It cannot be combined with
tls.serverCertificate.secretLinkon any port. - It is not supported on internal domains.
- Linking a generator to a domain requires the
usepermission on the generator. - The generator must exist. A domain that links to a missing generator is rejected.
Status
Once a generator is created, Control Plane registers the ACME account with the CA. The result is reported instatus:
Check
status.ready before linking domains to a new generator.
Deleting
A certificate generator cannot be deleted while a domain references it. RemovecertificateGeneratorLink from those domains, or point them at another generator, first. A generator tagged cpln/protected cannot be deleted either.
Permissions
Use
certificategenerator as the targetKind in a policy.
Quota
An org can have up to 10 certificate generators by default (certificategenerators quota).