cert-manager is a native Kubernetes certificate management controller. It can help with issuing certificates from a variety of sources, such as Let’s Encrypt, HashiCorp Vault, Venafi, a simple signing key pair, or self signed.
You can modify it and use cert-manager. There is some examplesabout installing it with Helm in the article.
Prerequisites
Kubernetes (K8S)
Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
Helm
Helm is the best way to find, share, and use software built for Kubernetes.
How to Install
1 2 3 4
# git clone example and cert-manager. $ git clone --recursive https://github.com/CloudoLife/helm-cert-manager-example $ cd helm-cert-manager-example
Custom Values.yaml
Edit values.yaml in helm-cert-manager-example directory, and replace content within < and >.
--- apiVersion:cert-manager.io/v1 kind:ClusterIssuer metadata: name:letsencrypt-staging 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. email:[email protected] server:https://acme-staging-v02.api.letsencrypt.org/directory privateKeySecretRef: # Secret resource that will be used to store the account's private key. name:letsencrypt-staging-secret # Add a single challenge solver, HTTP01 using nginx solvers: -http01: ingress: class:nginx
# manifests/ClusterIssuer-letsencrypt-prod.yaml --- apiVersion:cert-manager.io/v1 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. email:[email protected] server:https://acme-v02.api.letsencrypt.org/directory privateKeySecretRef: # Secret resource that will be used to store the account's private key. name:letsencrypt-production-secret # Add a single challenge solver, HTTP01 using nginx solvers: -http01: ingress: class:nginx
Failed to register ACME account: 400 urn:ietf:params:acme:error:invalidEmail: Error creating new account :: invalid contact domain. Contact emails @example.com are forbidden
1 2 3
... Message: Failed to register ACME account: 400 urn:ietf:params:acme:error:invalidEmail: Error creating new account :: invalid contact domain. Contact emails @example.com are forbidden ...
Update [email protected] with other valid email address to fix that issue.
1 2 3 4 5 6 7 8 9 10
# ClusterIssuer-letsencrypt-xxx.yaml
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. - email: [email protected] + email: [email protected] server: https://acme-staging-v02.api.letsencrypt.org/directory