Cert Manager Docker Image
Bitnami提供的cert-manager Helm chart,用于在Kubernetes集群中部署和管理TLS证书的自动化工具。
Bitnami Secure Images Helm chart for cert-manager
cert-manager is a Kubernetes add-on to automate the management and issuance of TLS certificates from various issuing sources.
https://github.com/jetstack/cert-manager
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
TL;DR
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/cert-manager
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository.
Introduction
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
This chart bootstraps a https://cert-manager.io/ Deployment in a https://kubernetes.io cluster using the https://helm.sh package manager.
Before you begin
- Kubernetes 1.23+
- Helm 3.8.0+
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/cert-manager
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts. Tip: List all releases usinghelm list
Configuration and installation details
This section describes credentials, configuration, and other installation options.
Resource requests and limits
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.
https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/apps-tutorials-understand-rolling-tags-containers-index.html
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
Backup and restore
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using https://velero.io/, a Kubernetes backup/restore tool. Find the instructions for using Velero in https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/apps-tutorials-backup-restore-deployments-velero-index.html.
Adding extra environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the extraEnvVars property.
yamlextraEnvVars: - name: LOG_LEVEL value: DEBUG
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the extraEnvVarsCM or the extraEnvVarsSecret values.
Using configuration files
The cert-manager chart supports using configuration files for the controller, webhook, and cainjector components. This allows you to configure advanced settings using the native cert-manager configuration format.
Controller configuration
You can provide custom configuration for the cert-manager controller by setting controller.overrideConfiguration. The chart will automatically create a ConfigMap with the configuration file and mount it in the controller pod.
yamlcontroller: overrideConfiguration: # Add your custom controller configuration here # This will be merged with the default configuration leaderElectionConfig: leaseDuration: 60s
Alternatively, you can use an existing ConfigMap by setting controller.existingConfigMap to the name of your ConfigMap. The ConfigMap must contain a config.yaml key with the configuration file.
Webhook configuration
Similarly, you can configure the webhook component using webhook.overrideConfiguration:
yamlwebhook: overrideConfiguration: # Add your custom webhook configuration here # This will be merged with the default configuration
Or use an existing ConfigMap with webhook.existingConfigMap.
CAInjector configuration
For the cainjector component, use cainjector.overrideConfiguration:
yamlcainjector: overrideConfiguration: # Add your custom cainjector configuration here # This will be merged with the default configuration
Or use an existing ConfigMap with cainjector.existingConfigMap.
Prometheus metrics
This chart can be integrated with Prometheus by setting metrics.enabled to true. This will expose cert-manager native Prometheus endpoint in the service. It will have the necessary annotations to be automatically scraped by Prometheus.
Prometheus requirements
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the https://github.com/bitnami/charts/tree/main/bitnami/prometheus or the https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus to easily have a working Prometheus in your cluster.
Integration with Prometheus Operator
The chart can deploy ServiceMonitor objects for integration with Prometheus Operator installations. To do so, set the value metrics.serviceMonitor.enabled=true. Ensure that the Prometheus Operator CustomResourceDefinitions are installed in the cluster or it will fail with the following error:
textno matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus for having the necessary CRDs and the Prometheus Operator.
Sidecars and Init Containers
If you have a need for additional containers to run within the same pod as the cert-manager app (e.g. an additional metrics or logging exporter), you can do so via the sidecars config parameter. Simply define your container according to the Kubernetes container spec.
yamlsidecars: - name: your-image-name image: your-image imagePullPolicy: Always ports: - name: portname containerPort: 1234
Similarly, you can add extra init containers using the initContainers parameter.
yamlinitContainers: - name: your-image-name image: your-image imagePullPolicy: Always ports: - name: portname containerPort: 1234
Generate TLS certificates using Self Signed Issuers
Cert Manager supports issuing certificates through different Issuers. For instance, you can use a Self Signed Issuer to issue the certificates.
The Self Signed issuer doesn't represent a certificate authority as such, but instead denotes that certificates will "sign themselves" using a given private key.
NOTE: Find the list of available Issuers in the https://cert-manager.io/docs/configuration/#supported-issuer-types.
To configure Cert Manager, create an Issuer object. The structure of this object differs depending on the Issuer type. Self Signed issuer are really easy to configure.
To create a self signed issuer to generate a self signed certificate, declare an Issuer, a ClusterIssuer and a Certificate, as shown below:
yamlapiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-prod spec: selfSigned: {} --- apiVersion: cert-manager.io/v1 kind: Issuer metadata: name: letsencrypt-ca namespace: sandbox spec: ca: secretName: letsencrypt-ca --- apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: letsencrypt-ca namespace: sandbox spec: isCA: true commonName: osm-system secretName: letsencrypt-ca issuerRef: name: letsencrypt-prod kind: ClusterIssuer group: cert-manager.io
Next, use the ClusterIssuer to generate certificates for the applications in your Kubernetes cluster. Learn how to secure your Ingress resources.
After the Ingress resource is ready, Cert Manager will create a secret. This secret contains the generated TLS certificate. This can be checked as shown below:
text$ kubectl get secret --namespace=sandbox NAME TYPE DATA AGE letsencrypt-ca kubernetes.io/tls 3 Xs
Generate TLS certificates using ACME Issuers
Cert Manager supports issuing certificates through different Issuers. For instance, you can use a public ACME (Automated Certificate Management Environment) server to issue the certificates.
NOTE: Find the list of available Issuers in the https://cert-manager.io/docs/configuration/#supported-issuer-types.
To configure Cert Manager, create an Issuer object. The structure of this object differs depending on the Issuer type. For ACME, it is necessary to include the information for a single account registered in the ACME Certificate Authority server.
Once Cert Manager is configured to use ACME, it will verify that you are the owner of the domains for which certificates are being requested. Cert Manager uses two different challenges to verify that you are the owner of your domain: HTTP01 or DNS01. https://cert-manager.io/docs/concepts/acme-orders-challenges/#challenge-scheduling.
NOTE: Learn more about the process to solve challenges in the https://cert-manager.io/docs/configuration/acme/#solving-challenges.
To create a ACME issuer for use with Let's Encrypt, declare an Issuer as shown below:
yamlapiVersion: cert-manager.io/v1alpha2 kind: ClusterIssuer metadata: name: letsencrypt-prod spec: acme: # You must replace this email address with your own. # Let's Encrypt will use this to contact you about expiring # certificates, and issues related to your account. # Replace the EMAIL-ADDRESS placeholder with the correct email account email: EMAIL-ADDRESS server: https://acme-v02.api.letsencrypt.org/directory privateKeySecretRef: name: letsencrypt-prod # Add a single challenge solver, HTTP01 using nginx solvers: - http01: ingress: class: nginx
Next, use the ClusterIssuer to generate certificates for the applications in your Kubernetes cluster. Learn how to secure your Ingress resources.
After the Ingress resource is ready, Cert Manager verifies the domain using HTTP01/DNS01 challenges. During this verification process, the controller log can be used to check the status, as shown below:
text$ kubectl get certificates NAME READY SECRET AGE letencrypt-ca False letencrypt-ca X
The status remains False whilst verification is in progress. This status will change to True when the HTTP01 verification is completed successfully.
text$ kubectl get certificates NAME READY SECRET AGE letencrypt-ca True letencrypt-ca X $ kubectl get secrets NAME TYPE DATA AGE letencrypt-ca kubernetes.io/tls 3 Xm
Secure Ingress resources with Cert Manager
Once you configure an Issuer for Cert Manager (either a Self-Signed Issuer or an ACME Issuer), Cert Manager will make use of this Issuer to create a TLS secret containing the certificates. Cert Manager can only create this secret if the application is already exposed. One way to do this is with an Ingress Resource which exposes the application and includes the corresponding annotations for Cert Manager.
There are two options to expose your application through an Ingress Controller using Cert Manager to manage the TLS certificates:
-
Deploy another Helm chart which supports exposing the application through an Ingress controller. For instance, use the https://github.com/bitnami/charts/tree/main/bitnami/wordpress and https://github.com/bitnami/charts/tree/main/bitnami/wordpress#ingress. To enable the integration with CertManager, add the annotations below to the ingress.annotations parameter:
text# Set up your ingress.class below (in this example, we are using nginx ingress controller) kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: letsencrypt-prod -
Create your own Ingress resource as shown in the example below:
yamlapiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-test annotations: # Set up your ingress.class below (in this example, we are using nginx ingress controller) kubernetes.io/ingress.class: "nginx" cert-manager.io/issuer: "letsencrypt-prod" spec: tls: # Replace the DOMAIN placeholder with the correct domain name - hosts: - DOMAIN secretName: letsencrypt-ca rules: # Replace the DOMAIN placeholder with the correct domain name - host: DOMAIN http: paths: - path: / pathType: Exact backend: service: name: ingress-test port: number: 80
Deploying extra resources
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the extraDeploy parameter.
Setting Pod's affinity
This chart allows you to set your custom affinity using the controller.affinity, cainjector.affinity or webhook.affinity parameters. Find more information about Pod's affinity in the https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity.
As an alternative, you can make use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the https://github.com/bitnami/charts/tree/main/bitnami/common#affinities chart. To do so, set the controller.podAffinityPreset, cainjector.podAffinityPreset, webhook.podAffinityPreset, controller.podAntiAffinityPreset, cainjector.podAntiAffinityPreset, webhook.podAntiAffinityPreset, controller.nodeAffinityPreset, cainjector.nodeAffinityPreset or webhook.nodeAffinityPreset parameters.
FIPS parameters
The FIPS parameters only have effect if you are using images from the https://go-vmware.broadcom.com/contact-us.
For more information on this new support, please refer to the https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/security-frameworks-FIPS-compliance.html.
Parameters
The following subsections list global, common, and component-specific parameters.
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultStorageClass | Global default StorageClass for Persistent Volume(s) | "" |
global.storageClass | DEPRECATED: use global.defaultStorageClass instead | "" |
global.defaultFips | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' object | restricted |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.fullname | "" |
fullnameOverride | String to fully override common.names.fullname | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
extraDeploy | Array of extra objects to deploy with the release | [] |
logLevel | Set up cert-manager log level | 2 |
clusterResourceNamespace | Namespace used to store DNS provider credentials etc. for ClusterIssuer resources. If empty, uses the namespace where the controller is deployed. | "" |
leaderElection.namespace | Namespace which leaderElection works. | kube-system |
installCRDs | Flag to install cert-manager CRDs | false |
Controller deployment parameters
| Name | Description | Value |
|---|---|---|
controller.replicaCount | Number of Controller replicas |
Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-cert-manager-index.html
bitnamicharts 命名空间的其他可用镜像:
bitnamicharts/mysql
bitnamicharts/kafka
bitnamicharts/etcd
bitnamicharts/postgresql
bitnamicharts/harbor
bitnamicharts/milvus
更多相关 Docker 镜像与资源
以下是 bitnamicharts/cert-manager 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 cert-manager 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务