Skip to content

Install Guide

Source: k8s/issuer/docs/install.md

  • Kubernetes 1.30+ (tested on 1.31, target 1.35)
  • cert-manager 1.16+ installed in the cluster
  • Network reachability from cluster to PKI Manager API
  • A Kubernetes integration in PKI Manager UI (yields a one-time service token)

1. Create a Kubernetes integration in PKI Manager

Section titled “1. Create a Kubernetes integration in PKI Manager”
  1. Open PKI Manager UI → Operations → Integrations.
  2. Click Add Integration, explicitly select Kubernetes, choose the issuing CA, and give it a name.
  3. Copy the displayed Service Token. It is shown once. Use a separate integration for each controller/CA.

The legacy cluster.register API still creates Kubernetes integrations; generic API clients must pass kind: "kubernetes" to integration.register.

The chart is not in a Helm repository: install it from a clone of this repository. The chart default image tag is its appVersion. cz bump keeps appVersion equal to the release version, and the k8s-issuer workflow publishes the image tag X.Y.Z when the tag vX.Y.Z is pushed. So a default install pulls a published image. The workflow also publishes the short commit SHA and latest on every push to main. To pin another tag, set image.tag.

Terminal window
cd k8s/issuer
helm upgrade --install pki-manager-issuer deploy/helm/pki-manager-issuer \
-n pki-manager-issuer --create-namespace
# optional: --set image.tag=<published tag>, for example a short commit SHA

cert-manager requires every CertificateRequest to be Approved before an issuer signs it, and its built-in approver only auto-approves first-party (cert-manager.io) issuers. So that requests for this external issuer are auto-approved, the chart installs (when approver.enabled=true, the default) a ClusterRole + ClusterRoleBinding granting cert-manager’s controller the approve verb on this issuer’s signers (issuers.pki-manager.issuer.io/*, clusterissuers.pki-manager.issuer.io/*).

The binding targets the cert-manager controller ServiceAccount, defaulting to cert-manager in namespace cert-manager. If yours differs, set it:

Terminal window
helm upgrade --install pki-manager-issuer deploy/helm/pki-manager-issuer \
-n pki-manager-issuer --create-namespace \
--set approver.certManagerServiceAccount.name=<sa> \
--set approver.certManagerServiceAccount.namespace=<ns>

Set --set approver.enabled=false to manage approval yourself (custom approver, manual, etc.).

apiVersion: v1
kind: Secret
metadata:
name: pki-manager-token
namespace: pki-manager-issuer
type: Opaque
stringData:
token: pkimg_<TOKEN_FROM_UI>
---
apiVersion: pki-manager.issuer.io/v1alpha1
kind: ClusterIssuer
metadata:
name: pki-manager-default
spec:
url: https://pki.your.domain
caId: <CA_UUID_FROM_UI>
authSecretRef:
name: pki-manager-token
key: token
certificateType: dual

Apply and watch readiness:

Terminal window
kubectl apply -f clusterissuer.yaml
kubectl get clusterissuer.pki-manager.issuer.io pki-manager-default -o jsonpath='{.status.conditions}'

Ready=True/Reason=Verified means the controller has authenticated and matched CAID.

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: example-tls
namespace: default
spec:
secretName: example-tls
issuerRef:
group: pki-manager.issuer.io
kind: ClusterIssuer
name: pki-manager-default
commonName: example.cluster.local
dnsNames: [example.cluster.local]
duration: 2160h
renewBefore: 360h
usages: [server auth, client auth]

cert-manager creates a CertificateRequest; the controller signs it via PKI Manager and writes the chain into Secret/example-tls with tls.crt, tls.key, ca.crt.

Symptom Cause Fix
Issuer Ready=False, Reason=SecretMissing Wrong namespace or key ClusterIssuer secrets live in controller’s namespace; use key: token
Reason=Unreachable Network / TLS Set caBundle if PKI Manager uses internal CA; check NetworkPolicy
Reason=CAIDMismatch Token belongs to different CA Re-register cluster in PKI Manager bound to the right CA
CertificateRequest stuck unapproved approver RBAC missing or bound to the wrong SA Ensure approver.enabled=true and that approver.certManagerServiceAccount matches your cert-manager controller ServiceAccount (default cert-manager/cert-manager)
401 Unauthorized in controller logs Token revoked or wrong Re-register and rotate Secret