Installing a certificate using Let's Encrypt
Раздел «For cluster administrators»: быстрый переход по подразделам
Before proceeding with adding a certificate to the cluster, review the procedure on the How to add a certificate page.
To create certificates using Let’s Encrypt, the ingress controller must be accessible from the Internet. To implement this requirement, at least one of the following conditions must be met:
- The external balancer must have a white (public) IP address;
- A white (public) IP address for IngressVIP must be specified.
Script for adding to a cluster
- [Configure and add ClusterIssuer to the cluster](#create-and-install-a certificate-in-the-cluster-using-lets-encrypt).
- Update certificate settings in system services.
Create and install a certificate in the cluster using Let’s Encrypt
- Create YAML file acme-issuer.yaml with the manifest of the ClusterIssuer object.
ClusterIssuer Example
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: <resource name>
namespace: cert-manager
spec:
acme:
server: <your parameter value>
email: <your parameter value>
privateKeySecretRef:
name: <your parameter value>
solvers:
- http01:
ingress:
class: nginx
| Parameter | Description | Data type | Example |
|---|---|---|---|
metadata.name | Name of the ClusterIssuer to be created | string | letsencrypt |
acme.server | Let’s Encrypt server URL | string | https://acme-v02.api.letsencrypt.org/directory |
acme.email | Email account Let’s Encrypt | string | name@example.com |
acme.privateKeySecretRef.name | The name of the secret in which the account key will be saved automatically | string | letsencrypt |
- Apply the generated ClusterIssuer manifest.
Command
kubectl apply -f acme-issuer.yaml
- Assign secrets in system services.