Installing a certificate using Let's Encrypt

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:

  1. The external balancer must have a white (public) IP address;
  2. A white (public) IP address for IngressVIP must be specified.

Script for adding to a cluster

  1. [Configure and add ClusterIssuer to the cluster](#create-and-install-a certificate-in-the-cluster-using-lets-encrypt).
  2. Update certificate settings in system services.

Create and install a certificate in the cluster using Let’s Encrypt

  1. 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
ParameterDescriptionData typeExample
metadata.nameName of the ClusterIssuer to be createdstringletsencrypt
acme.serverLet’s Encrypt server URLstringhttps://acme-v02.api.letsencrypt.org/directory
acme.emailEmail account Let’s Encryptstringname@example.com
acme.privateKeySecretRef.nameThe name of the secret in which the account key will be saved automaticallystringletsencrypt
  1. Apply the generated ClusterIssuer manifest.
Command
kubectl apply -f acme-issuer.yaml
  1. Assign secrets in system services.