Configuring trust bundle
After installing the trust-manager operand, you must use the Bundle custom resource (CR) to distribute certificate authority (CA) certificates across your cluster. A trust bundle combines certificate sources and maintains target ConfigMap and Secret objects across selected namespaces.
If you configure your trust bundle to use the default CAs, you do not need to manually provision the source certificates. The controller reads them from the cert-manager-operator-trusted-ca-bundle ConfigMap, which is injected by the Cluster Network Operator (CNO) during the Operator installation.
|
|
Distributing certificates by using trust manager is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope. |
-
You have access to the cluster with
cluster-adminprivileges. -
You have installed
trust-manageroperand.
-
To inject the trust bundle into a specific namespace, apply the required label by running the following command:
$ oc patch namespace <namespace> --type=merge '{"metadata":{"labels":{"trust.cert-manager.io/inject":"true"}}}'The trust-manager operand creates the target bundle in all namespaces that match the label selector defined in your
BundleCR. -
Create a YAML file, for example,
bundle.yaml, that defines theBundleobject as shown in the following example:apiVersion: trust.cert-manager.io/v1alpha1 kind: Bundle metadata: name: example-bundle spec: sources: - useDefaultCAs: true target: configMap: key: ca-certificates.crt secret: key: ca-certificates.crt namespaceSelector: matchLabels: trust.cert-manager.io/inject: "true"For more information on bundle configurations, see trust-manager usage.
If your Bundle CR targets a
Secretobject, you must set thespec.trustManagerConfig.secretTargets.policyfield in your TrustManager CR toCustomand add the name of target secret to thespec.trustManagerConfig.secretTargets.authorizedSecretslist. If thespec.trustManagerConfig.secretTargets.policyfield is set toDisabled, the Bundle CR fails to create the target secret. -
Create the
Bundlecustom resource by running the following command:$ oc create -f bundle.yaml
-
Verify the status of Bundle CR by running the following command:
$ oc get Bundle example-bundle -o jsonpath='{.status.conditions}' | jqIn the output, the
reasonmust be set toSyncedandstatusmust be set toTrue, as shown in the following example:[ { "lastTransitionTime": "2026-03-27T12:03:42Z", "message": "Successfully synced Bundle to namespaces that match this label selector: trust.cert-manager.io/inject=true", "observedGeneration": 1, "reason": "Synced", "status": "True", "type": "Synced" } ] -
Verify the target secret by running the following command:
$ oc describe secret example-bundle -n trust-bundle-targetExample outputName: example-bundle Namespace: trust-bundle-target Labels: trust.cert-manager.io/bundle=example-bundle Annotations: trust.cert-manager.io/hash: 55c00f8109c4c6b1ee4710aa53ad280355973f25444d6bb13a93851af0d8f5d8 Type: Opaque Data ==== ca-certificates.crt: 219257 bytes -
Verify the target ConfigMap by running the following command:
$ oc get cm example-bundle -n trust-bundle-targetExample outputNAME DATA AGE example-bundle 1 4m25s