digicert-issuer is a Kubernetes external issuer for cert-manager. It lets cert-manager Certificate resources obtain certificates from the DigiCert certificate-authority service rather than from cert-manager's built-in issuers.
The controller provides two issuer.digicert.com/v1alpha1 resources:
DigiCertIssueris namespaced. It can issue certificates forCertificateresources in the same namespace and reads its referenced Secrets from that namespace.DigiCertClusterIssueris cluster-scoped. It can issue certificates from any namespace and reads its referenced Secrets from the controller's cluster-resource namespace,cert-managerby default.
For each configured issuer, the controller checks that the DigiCert CA is reachable and that its credentials are valid. A ready issuer handles cert-manager CertificateRequest resources, submits their CSRs to the CA, and returns the resulting certificate material to cert-manager. After a successful issuance it also records the outputs described in Certificate Outputs.
The controller supports API-key authentication (x-api-key, the default) and bearer-token authentication. It reads credentials on each check and signing operation, so rotating a referenced Secret takes effect without restarting the controller.
- Requirements
- Installation
- Issuer Configuration
- Resources
- Certificate Outputs
- Certificate Management
- Revoking Certificates and Uninstalling
- Security Best Practices
- Troubleshooting
- Development
- Distribution
- Contributing
- License
Use the following versions and access before deploying to production:
kubectlconfigured for the target cluster, with permission to install CRDs and deploy cluster-scoped RBAC. A cluster administrator is normally required for a first installation.- cert-manager
v1.20.2installed and ready in the target cluster. The controller must be installed after cert-manager's CRDs are available. - A reachable DigiCert certificate-authority service, valid issuing CA, account, and certificate-template IDs, and an API key or bearer token authorized to use them.
- The CA's PEM trust bundle when the service is reached through HTTPS. Treat this as required for production.
- An image registry reachable by the cluster nodes, plus permission for the target namespace to pull the controller image.
Do not place API keys, bearer tokens, or private trust bundles in Git. Create Kubernetes Secrets from protected local files or your secret-management workflow. The checked-in files under config/samples/ are examples only and contain placeholder or environment-specific values.
- Go
1.26.5or later. - Docker, or another compatible tool selected with
CONTAINER_TOOL, for image builds. kubectland Kind for local cluster and E2E work.- Access to a non-production DigiCert CA when running the live integration matrix. Do not use production credentials for ordinary development.
The Makefile downloads pinned local build tools into bin/ when needed. No global controller-gen, Kustomize, envtest, or golangci-lint installation is required.
Install cert-manager before installing this controller. For a pinned cert-manager installation, use:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.20.2/cert-manager.yaml
kubectl wait --for=condition=Available deployment/cert-manager-webhook \
--namespace cert-manager --timeout=5mVerify that the cert-manager controller, webhook, and CA injector are running:
kubectl get pods --namespace cert-managerThe controller runs as one deployment in the digicert-issuer-system namespace and watches cert-manager CertificateRequest resources across the cluster. It requires cluster-scoped RBAC because a DigiCertClusterIssuer may service certificate requests from any namespace.
Build and publish an image the cluster nodes can pull. Use an immutable release tag rather than latest for a production rollout.
export IMG=<REGISTRY>/digicert-issuer:<TAG>
make docker-build docker-push IMG="$IMG"
make install
make deploy IMG="$IMG"
kubectl rollout status deployment/digicert-issuer-controller-manager \
--namespace digicert-issuer-system --timeout=3mmake install applies only the issuer CRDs (from config/crd). make deploy applies the full Kustomize bundle from config/default (including CRDs, RBAC, and the controller deployment). Both commands use the active kubeconfig context, so confirm the context before running them:
kubectl config current-contextFor a private image registry, configure the normal Kubernetes image-pull credentials before deployment. The supplied manager manifest uses IfNotPresent; update the manifest or your release overlay to meet your image-pinning and pull-policy requirements.
Choose the issuer scope before creating credentials:
- Use
DigiCertClusterIssuerfor centrally managed CA credentials that can issue certificates in multiple namespaces. By default, its credential and CA-bundle Secrets must be incert-manager. - Use
DigiCertIssuerwhen one team or namespace must own its own CA credentials. Its credential and CA-bundle Secrets must be in the same namespace as the issuer.
The value of the manager's --cluster-resource-namespace argument controls where ClusterIssuer Secrets are resolved. The checked-in deployment sets it to cert-manager. Change that argument only as part of a deliberate secret-management design, then put all ClusterIssuer Secrets in the replacement namespace.
Both issuer types use the same spec fields:
| Name | Description | Type | Required |
|---|---|---|---|
url |
Base URL of the DigiCert certificate-authority service. | String | Yes |
authSecretName |
Name of the credential Secret. It must contain api-key for apiKey mode or token for bearer mode. |
String | Yes |
authMode |
apiKey (default) sends x-api-key; bearer sends Authorization: Bearer <token>. |
String | No |
issuerID |
UUID of the issuing CA in the certificate-authority service. | String | Yes |
accountID |
UUID of the DigiCert account used for issuance. | String | Yes |
templateID |
UUID of the DigiCert certificate template applied to each issuance request. | String | Yes |
caBundleSecretName |
Secret containing the CA PEM bundle at ca.crt. Required in practice for verified HTTPS connections. |
String | No |
For a DigiCertClusterIssuer, create the credential Secret in cert-manager, or in the namespace selected by --cluster-resource-namespace. Store the API key in a protected local file rather than in shell history:
umask 077
printf '%s' '<DIGICERT_API_KEY>' > /tmp/digicert-api-key
kubectl create secret generic digicert-issuer-credentials \
--namespace cert-manager \
--from-file=api-key=/tmp/digicert-api-key
rm /tmp/digicert-api-keyFor bearer authentication, create the same Secret with --from-file=token=/path/to/token and set authMode: bearer in the issuer resource.
Create a Secret containing the DigiCert CA's PEM trust bundle. The controller reads the bundle from the ca.crt key:
kubectl create secret generic digicert-ca-bundle \
--namespace cert-manager \
--from-file=ca.crt=/path/to/digicert-ca.pemSecurity requirement: When
caBundleSecretNameis omitted, the current client skips TLS certificate verification. SetcaBundleSecretNamefor every HTTPS production endpoint. Use plain HTTP only on a tightly controlled, private network.
Credential and CA-bundle Secret contents are read during issuer checks and signing calls. Updating the referenced Secret therefore takes effect without restarting the manager, but operators should validate a new credential using a controlled certificate request after rotation.
Create a DigiCertClusterIssuer for a centrally managed issuer. Replace every placeholder and retain the CA bundle field for a verified HTTPS connection:
apiVersion: issuer.digicert.com/v1alpha1
kind: DigiCertClusterIssuer
metadata:
name: digicert-production
spec:
url: https://<DIGICERT_CA_HOST>/<BASE_PATH>
authSecretName: digicert-issuer-credentials
authMode: apiKey
issuerID: <ISSUING_CA_UUID>
accountID: <ACCOUNT_UUID>
templateID: <CERTIFICATE_TEMPLATE_UUID>
caBundleSecretName: digicert-ca-bundlekubectl apply -f digicert-clusterissuer.yaml
kubectl wait --for=condition=Ready digicertclusterissuer/digicert-production \
--timeout=2m
kubectl get digicertclusterissuer digicert-productionThe issuer condition is the first operational health check: it confirms that the controller can reach the DigiCert CA and authenticate. If it does not become ready, see Troubleshooting.
Use DigiCertIssuer when issuer ownership and CA credentials must be isolated per namespace. Create both Secrets in that namespace, then apply:
apiVersion: issuer.digicert.com/v1alpha1
kind: DigiCertIssuer
metadata:
name: team-a-digicert
namespace: team-a
spec:
url: https://<DIGICERT_CA_HOST>/<BASE_PATH>
authSecretName: digicert-issuer-credentials
authMode: apiKey
issuerID: <ISSUING_CA_UUID>
accountID: <ACCOUNT_UUID>
templateID: <CERTIFICATE_TEMPLATE_UUID>
caBundleSecretName: digicert-ca-bundleCertificates must reside in team-a and use this issuer reference:
issuerRef:
group: issuer.digicert.com
kind: DigiCertIssuer
name: team-a-digicertAfter a successful issuance, the controller records the following outputs so operators and automation can retrieve CA-side identifiers without querying the DigiCert service directly:
| Name | Written On | Description |
|---|---|---|
issuer.digicert.com/certificate-id |
CertificateRequest |
The certificate ID returned by the DigiCert certificate-authority service. |
issuer.digicert.com/serial-number |
Owning Certificate |
The serial number of the returned leaf certificate. |
Retrieve them with:
kubectl get certificaterequest <CERTIFICATE_REQUEST_NAME> --namespace default \
-o jsonpath='{.metadata.annotations.issuer\.digicert\.com/certificate-id}{"\n"}'
kubectl get certificate <CERTIFICATE_NAME> --namespace default \
-o jsonpath='{.metadata.annotations.issuer\.digicert\.com/serial-number}{"\n"}'Both annotations are written synchronously as part of certificate issuance, so they are durable across controller restarts and available as soon as the CertificateRequest/Certificate reach Ready.
Use a permitted DNS name and template. cert-manager creates the CertificateRequest; this controller sends its CSR to DigiCert and cert-manager writes the returned certificate to the target Secret.
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: digicert-test-cert
namespace: default
spec:
secretName: digicert-test-cert-tls
commonName: test.example.com
dnsNames:
- test.example.com
issuerRef:
group: issuer.digicert.com
kind: DigiCertClusterIssuer
name: digicert-productionkubectl apply -f test-certificate.yaml
kubectl wait --for=condition=Ready certificate/digicert-test-cert \
--namespace default --timeout=3m
kubectl get secret digicert-test-cert-tls --namespace defaultInspect the created CertificateRequest and the issued Certificate for the Certificate Outputs:
kubectl get certificaterequest --namespace defaultDelete the certificates and issuer resources that depend on the controller before removing it. Deleting CRDs removes all custom resources of those kinds.
kubectl delete certificate digicert-test-cert --namespace default --ignore-not-found
kubectl delete digicertclusterissuer digicert-production --ignore-not-found
make undeploy
make uninstallFor the local Kind quick-start environment, remove the Kind cluster after uninstalling:
kind delete cluster --name digicert-issuer-devNote: This controller does not call a DigiCert revocation API on delete. Deleting a
Certificateremoves the KubernetesSecretand stops renewal, but the certificate itself remains valid at the CA until it expires or is separately revoked through the DigiCert platform.
- Never commit credentials. API keys, bearer tokens, and private CA bundles must never be placed in Git. Create Kubernetes Secrets from protected local files or your secret-management workflow; treat everything under
config/samples/as a placeholder, not a real credential. - Always set
caBundleSecretNamefor HTTPS endpoints. When it is omitted, the controller intentionally skips TLS certificate verification and logs that condition on every issuer reconcile. Use plain HTTP only on a tightly controlled, private network. - Scope credentials to the issuer they belong to. Prefer
DigiCertIssuer(namespaced) when a team must not share its CA credentials with other tenants; useDigiCertClusterIssueronly for centrally managed credentials. - Validate after rotation. Credential and CA-bundle Secrets are read on every check/sign call, so rotation takes effect without a restart — but always validate a rotated credential with a controlled certificate request rather than assuming success.
- Least-privilege RBAC. The shipped
config/rbac/role.yamlonly grantsget/liston Secrets (nowatch/create/update/delete) andget/list/watchplus scopedpatch/updateonCertificateRequest,Certificate, and the issuer types. Do not broaden this without a corresponding code change that requires it.
-
Issuer never becomes
Ready. Inspect the resource status and manager logs:kubectl describe digicertclusterissuer digicert-production kubectl logs deployment/digicert-issuer-controller-manager \ --namespace digicert-issuer-system --container managerCommon causes: an unreachable
url, an invalid or expired credential inauthSecretName, or a missingcaBundleSecretNameagainst an endpoint that requires a private trust anchor. -
CertificateRequeststays pending / never reachesReady. Confirm the request was approved — cert-manager's built-in approver only auto-approves its own issuer types by default. This repository shipsconfig/rbac/approve_digicertissuer_role.yaml, which must be applied (it is included inmake deploy) so cert-manager's approver controller can approve requests referencingissuer.digicert.comissuer types. -
Certificate issuance fails with an authentication error from the CA. Verify
authModematches the key actually present inauthSecretName(api-keyforapiKeymode,tokenforbearermode), and that the credential has not expired or been revoked on the DigiCert side. -
TLS verification warnings in the logs.
Issuer has no caBundleSecretName configured; TLS certificate verification will be skipped...means the issuer is running without a trust bundle. This is only appropriate for a tightly controlled, private network — see Security Best Practices. -
Need more detail. Increase log verbosity with
--zap-log-level=debugon the manager Deployment, or re-run the CA integration matrix (see Development) against the same issuer to reproduce with full output.
This section is for contributors building, changing, and validating the controller. It uses the same issuer configuration as production, but the local Kind workflow lets contributors test an image before it is pushed to a registry. Values in angle brackets must be replaced with values for a non-production DigiCert CA.
api/v1alpha1/defines theDigiCertIssuerandDigiCertClusterIssuerCRDs and their validation markers. Runmake manifests generateafter changing these types or markers.internal/caclient/implements credential loading, CA readiness checks, and certificate signing requests.internal/signer/connects issuer-lib reconciliation to the CA client and writes certificate ID and serial-number annotations after issuance.cmd/main.goconfigures the manager, issuer controllers, health probes, and the cluster-resource Secret namespace.config/contains Kustomize deployment, RBAC, CRD, and sample manifests. Generated CRDs and RBAC must be regenerated rather than edited directly.test/e2e/verifies isolated deployment behavior.test/e2e-kubeconfig/verifies real issuance against a configured DigiCert CA.
kind create cluster --name digicert-issuer-dev
kubectl config use-context kind-digicert-issuer-dev
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.20.2/cert-manager.yaml
kubectl wait --for=condition=Available deployment/cert-manager-webhook \
--namespace cert-manager --timeout=5mConfirm that cert-manager is ready before continuing:
kubectl get pods --namespace cert-managerBuild the image with a local tag, load it into Kind, install the CRDs, and deploy the manager. The deployment runs in digicert-issuer-system and is configured to resolve ClusterIssuer Secrets from cert-manager.
export IMG=digicert-issuer:dev
make docker-build IMG="$IMG"
kind load docker-image "$IMG" --name digicert-issuer-dev
make install
make deploy IMG="$IMG"
kubectl rollout status deployment/digicert-issuer-controller-manager \
--namespace digicert-issuer-system --timeout=3mFor a DigiCertClusterIssuer, create the Secret in cert-manager. Store the API key in a local file with restrictive permissions so it is not exposed in shell history:
umask 077
printf '%s' '<DIGICERT_API_KEY>' > /tmp/digicert-api-key
kubectl create secret generic digicert-issuer-credentials \
--namespace cert-manager \
--from-file=api-key=/tmp/digicert-api-key
rm /tmp/digicert-api-keyIf the CA uses a private or internal TLS certificate, create the optional CA bundle Secret. The controller expects a PEM bundle at the ca.crt key:
kubectl create secret generic digicert-ca-bundle \
--namespace cert-manager \
--from-file=ca.crt=/path/to/digicert-ca.pemFor bearer-token authentication, create the credential Secret with --from-file=token=/path/to/token and set authMode: bearer in the issuer manifest instead.
Save the following manifest as digicert-clusterissuer.yaml, replacing every placeholder. Keep caBundleSecretName when the CA is accessed by HTTPS.
apiVersion: issuer.digicert.com/v1alpha1
kind: DigiCertClusterIssuer
metadata:
name: digicert-production
spec:
url: https://<DIGICERT_CA_HOST>/<BASE_PATH>
authSecretName: digicert-issuer-credentials
authMode: apiKey
issuerID: <ISSUING_CA_UUID>
accountID: <ACCOUNT_UUID>
templateID: <CERTIFICATE_TEMPLATE_UUID>
caBundleSecretName: digicert-ca-bundleApply it and wait until the controller has verified the endpoint and credentials:
kubectl apply -f digicert-clusterissuer.yaml
kubectl wait --for=condition=Ready digicertclusterissuer/digicert-production \
--timeout=2m
kubectl get digicertclusterissuer digicert-productionIf the issuer does not become ready, see Troubleshooting.
Save the following as test-certificate.yaml. Replace the DNS name with a name permitted by the configured CA and template.
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: digicert-test-cert
namespace: default
spec:
secretName: digicert-test-cert-tls
commonName: test.example.com
dnsNames:
- test.example.com
issuerRef:
group: issuer.digicert.com
kind: DigiCertClusterIssuer
name: digicert-productionkubectl apply -f test-certificate.yaml
kubectl wait --for=condition=Ready certificate/digicert-test-cert \
--namespace default --timeout=3m
kubectl get secret digicert-test-cert-tls --namespace default
kubectl get certificate digicert-test-cert --namespace default \
-o jsonpath='{.metadata.annotations.issuer\.digicert\.com/serial-number}{"\n"}'
kubectl get certificaterequest --namespace defaultThe final command lists the request created by cert-manager. Inspect it to retrieve the DigiCert certificate ID annotation (see Certificate Outputs).
Run the focused checks before sending a change for review. make build is the baseline local validation because it regenerates artifacts, formats code, runs go vet, and compiles the manager:
make build # Generate manifests and deepcopy code, format, vet, and build bin/manager
make run # Run the controller against the current kubeconfig
make test # Run non-E2E Go tests with envtest
make lint # Run golangci-lint
make help # List all supported targetsmake test-e2e creates and removes an isolated Kind cluster, then verifies controller deployment, health, and protected metrics. It is not a DigiCert CA integration test.
make test-e2e-kubeconfig is the CA integration matrix. It runs against the active kubeconfig and requires a deployed controller, cert-manager, a ready DigiCertClusterIssuer, and the configured credential Secret. It creates and removes a temporary namespace whose name begins with digicert-issuer-e2e-, then verifies ClusterIssuer and namespaced-issuer issuance, reissuance, invalid credentials, credential rotation, and both metadata annotations.
make test-e2e-kubeconfigSet these variables for a nondefault deployment:
E2E_CLUSTER_ISSUER=my-cluster-issuer \
E2E_CREDENTIALS_SECRET=my-credentials \
E2E_CREDENTIALS_NAMESPACE=my-credentials-namespace \
E2E_MANAGER_NAMESPACE=digicert-issuer-system \
make test-e2e-kubeconfigE2E tests are designed to validate the solution in an isolated environment (similar to GitHub Actions CI). Run them against a dedicated Kind cluster, not a "real" dev/prod cluster.
Generate a single install manifest after building and publishing the controller image:
make build-installer IMG=<REGISTRY>/digicert-issuer:<TAG>This creates dist/install.yaml, which contains the CRDs, RBAC, and controller deployment. cert-manager and DigiCert credential/issuer resources remain external prerequisites and must be installed or created separately.
- Keep API changes in
api/v1alpha1/and reconciliation or CA behavior changes in their owninginternal/package. Do not edit generated files underconfig/crd/bases/,config/rbac/role.yaml, orzz_generated.deepcopy.go. - Update or add focused tests with the behavior change. Use
make testfor unit and envtest coverage; usemake test-e2efor deployment behavior; runmake test-e2e-kubeconfigonly against a dedicated, non-production CA environment. - Run
make buildandmake lintbefore requesting review. If types, validation markers, or RBAC markers changed, verify that generated output is included by runningmake manifests generate. - Keep credentials, bearer tokens, and private CA bundles out of source control and test fixtures. Sanitize any externally supplied values before use and never hardcode secrets in manifests or code.
- Describe operational impact in the change: new RBAC, CRD changes, configuration migrations, TLS behavior, or required release steps.
See Development for the full local build and test workflow.
By contributing to this project, you represent and warrant that you are the author of the contribution, or have the necessary rights and permissions to make the contribution on behalf of yourself or your organization.
Copyright 2026.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
See the LICENSE file for the full terms.