cert-manager (certificate automation)
Basic information
Section titled “Basic information”| Item | Value |
|---|---|
| Version | v1.20.2 |
| Official docs | cert-manager documentation |
| Upstream source | common/cert-manager |
Concepts and features
Section titled “Concepts and features”cert-manager is a Kubernetes-native certificate controller: you declare the certificate you want as a resource, and it handles everything from issuance to renewal. It automates the manual work of creating certificates, putting them into Secrets, and replacing them before they expire.
Instead of generating keys by hand, copying certificates into Secrets, and remembering to rotate them before expiration, you describe the certificate you want as Kubernetes resources and let the controllers handle issuance, storage, CA propagation, and renewal. That model is especially valuable in Kubeflow because the platform relies heavily on admission webhooks and internal TLS. Manual certificate handling would be both fragile and tedious.
Custom resources (CRDs)
Section titled “Custom resources (CRDs)”- Issuer / ClusterIssuer: the signing authority that signs certificates.
Issueris namespaced;ClusterIssueris cluster-scoped. Supported issuance methods include SelfSigned, CA (private root CA), ACME (Let’s Encrypt and others), Vault, and Venafi. - Certificate: a declaration of the certificate you want, including the target domains/SANs, the issuer to use, the Secret name that should hold the result, and the renewal period. cert-manager turns this declaration into an actual certificate.
- CertificateRequest / Order / Challenge: internal resources used during issuance (ACME challenges and so on).
Deployments
Section titled “Deployments”- controller: watches
Certificateresources, createsCertificateRequestresources, gets them signed by the Issuer, stores the result in Secrets, and renews certificates automatically before they expire. - webhook: the admission webhook that handles validation and version conversion of cert-manager resources.
- cainjector: automatically injects the issued CA certificate (
ca.crt) into thecaBundlefield of other resources (other components’ webhooks, APIService, CRD conversion). This feature is especially important in Kubeflow.
For Kubeflow, cainjector is not an optional convenience. It is a major reason cert-manager is present at all.
The issued material always ends up in a Kubernetes Secret (tls.crt / tls.key / ca.crt), and workloads use TLS by mounting that Secret.
Role in Kubeflow
Section titled “Role in Kubeflow”How admission webhooks relate to certificates
Section titled “How admission webhooks relate to certificates”An admission webhook is an extension point that the Kubernetes API server calls while it processes a resource create or update request. When someone creates a Pod or custom resource with kubectl apply, the API server sends that request to the registered webhook server before storing it, either to validate it (validating: reject it if it breaks a rule) or to mutate it (mutating: modify the request, for example by setting defaults or injecting a sidecar). In other words, it is a review step that intervenes just before the resource is actually created.
This creates two constraints. First, communication between the API server and the webhook server must use HTTPS (TLS). Second, for the API server to trust the webhook server’s certificate, the CA that signed that certificate must be present in the caBundle field of the webhook configuration (ValidatingWebhookConfiguration / MutatingWebhookConfiguration). If caBundle is empty or wrong, the API server drops the webhook call as a TLS verification failure, and creation of the resource itself is blocked (if the webhook is mandatory, the component cannot start at all).
So every component that uses a webhook needs a certificate issued for its webhook server, renewed before expiration, and its CA injected into the caBundle of the corresponding webhook configuration. The cert-manager controller handles issuance and renewal automatically, and cainjector handles caBundle injection. Without this automation, a person would have to issue certificates by hand, fill in caBundle manually, and repeat this on every renewal.
Why Kubeflow needs it
Section titled “Why Kubeflow needs it”Kubeflow depends especially heavily on these admission webhooks. Many components, such as the Notebook spawner, Katib metric injection, KServe validation, and Profile/PodDefaults, use mutating/validating webhooks. For the components among them that use a cert-manager Certificate, cert-manager handles certificate issuance and caBundle injection automatically.
- Webhook certificate automation: issues the webhook server certificate for each component, and cainjector puts the caBundle into the corresponding webhook configuration. Without cert-manager, these webhooks fail at the admission stage.
- External HTTPS exposure: this repository has no domain and exposes services through a nip.io wildcard, and the ingress TLS certificate for it is issued by cert-manager’s self-signed ClusterIssuer. Because the environment is air-gapped, ACME (Let’s Encrypt), which needs external communication, cannot be used, so self-signed is the standard choice.
- KServe integration: the KServe controller’s webhook certificate is issued by a cert-manager
Certificate.
In practice, cert-manager solves three recurring problems for Kubeflow: webhook serving certificates are issued automatically, CA bundles are injected automatically into the webhook configurations that need them, and renewal happens automatically instead of becoming a future outage.
In short, cert-manager is a common prerequisite for “most webhook-based components” and for “HTTPS exposure”.
Deployment structure
Section titled “Deployment structure”cert-manager is deployed in two phases. The core (controller + webhook) must come up and become Ready first, so that the ClusterIssuer in the next phase can pass webhook validation.
- base: references
common/cert-manager/base. CRDs, thecert-managernamespace, and the controller / webhook / cainjector Deployments. On top of that it adds a controller resource patch and, for air-gap operation, rewrites the registry host of the three images (cert-manager-controller,-webhook,-cainjector, v1.20.2) to an internal mirror. - overlays/kubeflow: references
common/cert-manager/overlays/kubeflow. Adds the Kubeflow issuerkubeflow-self-signing-issuer(selfSigned ClusterIssuer), webhook configuration, and baseline NetworkPolicies.
Key ordering: the base webhook Deployment becomes Ready, then overlays/kubeflow (ClusterIssuer) is applied. If this order breaks, ClusterIssuer creation fails because the webhook is not there.
Deployment view
Section titled “Deployment view”Resource Placement
Section titled “Resource Placement”| Namespace | Resource | Name | Purpose |
|---|---|---|---|
| (cluster) | CRD | certificates / issuers / clusterissuers / certificaterequests … | Certificate API |
| (cluster) | Validating/Mutating Webhook | cert-manager-webhook | Validation/conversion of cert-manager resources |
| (cluster) | ClusterIssuer | kubeflow-self-signing-issuer | Self-signed issuer |
cert-manager | Deployment | cert-manager (controller) | Issuance/renewal orchestration |
cert-manager | Deployment | cert-manager-webhook | Admission validation/conversion server |
cert-manager | Deployment | cert-manager-cainjector | Injects caBundle into other resources |
Diagram
Section titled “Diagram”PlantUML source:
Operational flow
Section titled “Operational flow”When a component declares a Certificate, the controller gets it signed by the issuer and stores it in a Secret, and cainjector injects that CA into the caBundle wherever it is needed. As expiration approaches, the controller renews it automatically.
PlantUML source:
That flow is what keeps webhook-backed components healthy over time without ongoing manual certificate work.
Dependencies and interactions
Section titled “Dependencies and interactions”- Prerequisites: almost none. The base creates the
cert-managernamespace itself, so it does not depend on other namespaces. Internally, however, the order of core (webhook) Ready followed by ClusterIssuer must be kept. - Downstream (depends on cert-manager): components that declare a cert-manager
Certificate, such as the KServe webhook, the PodDefaults webhook, and Profile-related webhooks, plus the ingress certificate for external HTTPS exposure (issued bykubeflow-self-signing-issuerand stored as a Secret in istio-system).
Components that manage their own webhook certificates and components that do not
Section titled “Components that manage their own webhook certificates and components that do not”Not every webhook uses cert-manager. Knative Serving’s webhook generates and rotates its own certificates and injects its own caBundle. cert-manager becomes necessary only when net-certmanager is enabled for external TLS.
| Category | Example components | Where the certificate comes from |
|---|---|---|
| Self-managed webhook certificates | Knative Serving webhook, Knative Eventing webhook | The webhook Deployment creates and rotates its own certificates and injects the caBundle |
| Uses cert-manager Certificate | KServe webhook, PodDefaults webhook, Profile-related webhooks | Issued by a Certificate resource and stored in a Secret; ca-injector injects the caBundle |
| Conditional | Knative Serving external TLS (net-certmanager) | cert-manager issues external domain certificates only when this feature is enabled |
- Runtime interaction: a component declares a Certificate, the controller gets it signed by the Issuer, the Secret is stored, cainjector injects the caBundle, and the API server trusts that webhook. After that, automatic renewal before expiration repeats without downtime.
- Important interaction: many later components appear unrelated to certificates, but they quietly depend on cert-manager because admission breaks without valid webhook TLS and trusted CA bundles.
References
Section titled “References”- The self-signed ingress certificate in this repository is not in the browser trust store, so a “Not secure” warning appears, but TLS encryption itself works normally (an intended configuration in an air-gapped environment).
- cert-manager is a quiet dependency with outsized importance. In this Kubeflow deployment it is the shared certificate factory for both internal webhook trust and external TLS entrypoints. If it is missing or unhealthy, a surprising amount of the platform stops working even though the failure may first show up somewhere else.
- Operational checklist: confirm that the webhook is Ready before applying issuer resources, then verify that issued Secrets and injected
caBundlevalues are present for consumers. - Overlay:
overlays/dev/cert-manager/base,overlays/dev/cert-manager/overlays/kubeflow - Related documents:
- GitOps architecture and rationale
- kubeflow-istio-resources (consumer of the self-signed ingress certificate)