﻿# Install Cert-manager

> [HTML Version](install-cert-manager.html)

Cert-manager adds certificates and their elements as resource types into Kubernetes clusters, simplifying the process of obtaining, renewing, and using these certificates.

The installation consists of three steps:

1. [Download the Helm chart and configuration file](#download-helm-chart-and-config-file).

2. [Fill out the configuration file](#fill-config-file).

3. [Install the Cert-manager chart using helm in the Kubernetes cluster](#install-in-kubernetes-cluster).

## Step 1: Download the Helm chart and configuration file

For installation via the internet, obtain the configuration file \[OBJECT\] by executing the command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm show values brix365/cert-manager > values-cert-manager.yaml

````
Getting the configuration file for installation in a closed-loop environment without internet access

1. On a computer with internet access, download the archive of the latest version of the cert-manager chart from the BRIX repository by executing the following command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm pull brix365/cert-manager

2. ````
Copy the obtained chart archive \[OBJECT\] to the server where the installation will be performed.

3. Unpack the \[OBJECT\] chart on the server and copy the default configuration file \[OBJECT\]:

````
tar -xf cert-manager-X.Y.Z.tgz  
cp cert-manager/values.yaml values-cert-manager.yaml
````

## ````
Step 2: Fill out the configuration file

Fill out the configuration file \[OBJECT\] for installing Cert-manager.

````
\# cert-manager settings  
cert-manager:  
  # namespace for cert-manager (before installation, create kubectl create ns cert-manager)  
  namespace: ""  
  # install crds  
  installCRDs: true  
  # number of replicas for high availability  
  replicaCount: 1  
\#  
  webhook:  
    # number of replicas for high availability  
    replicaCount: 1  
\#  
  cainjector:  
    enabled: true  
    # number of replicas for high availability  
    replicaCount: 1  
  startupapicheck:  
    enabled: true

````
Filling out connection parameters to the private registry for installation in a closed-loop environment without internet access

  
To connect to the private **registry** you need to:

1. Download BRIX images and upload them to the local image registry. For more details refer to [Download BRIX images](downloadin-images-elma365.md).

2. Specify the address and path for the parameters \[OBJECT\].

3. Indicate the name of the secret with access rights to the private registry in the parameter \[OBJECT\]. The secret must be manually created and encrypted in Base64.

````
\# connection parameters for the private registry  
cert-manager:  
  image:  
    # address and path for the private registry  
    repository: registry.example.com/jetstack/cert-manager-controller  
  global:  
    # secret with access permissions for the private registry must be created manually and  
encrypted in Base64  
    imagePullSecrets:  
      - name: "myRegistryKeySecretName"  
  webhook:  
    # connection parameters for the private registry  
    image:  
      # address and path for the private registry  
      repository: registry.example.com/jetstack/cert-manager-webhook  
  cainjector:  
    # connection parameters for the private registry  
    image:  
      # address and path for the private registry  
      repository: registry.example.com/jetstack/cert-manager-cainjector  
\#  
  acmesolver:  
    # connection parameters for the private registry  
    image:  
      # address and path for the private registry  
      repository: registry.example.com/jetstack/cert-manager-acmesolver  
  startupapicheck:  
    # connection parameters for the private registry  
    image:  
      # address and path for the private registry  
      repository: registry.example.com/jetstack/cert-manager-ctl

- ````
address is \[OBJECT\];

- path is \[OBJECT\], \[OBJECT\], \[OBJECT\], \[OBJECT\], \[OBJECT\].

## Step 3: Install the Cert-manager chart using helm in the Kubernetes cluster

1. Install the Cert-manager chart in the namespace \[OBJECT\].

For online installation:

````
helm upgrade --install cert-manager brix365/cert-manager -f values-cert-manager.yaml -n cert-manager 

````
For offline installation without internet access, go to the directory with the downloaded chart and execute the command:

````
helm upgrade --install cert-manager ./cert-manager -f values-cert-manager.yaml -n cert-manager --create-namespace

2. ````
Make sure that the chart is deployed correctly. To do this, check the namespace \[OBJECT\] for the running modules:

````
kubectl get pod -n cert-manager  
NAME                             READY   STATUS    RESTARTS   AGE  
cert-manager-xxxx-xxx             1/1     Running   0          1m  
cert-manager-cainjector-xxx-xx    1/1     Running   0          1m  
cert-manager-webhook-xxx-xxx      1/1     Running   0          1m

## ````
Delete Cert-manager using helm in a Kubernetes cluster

````
начало внимание

````
Before deleting Cert-manager, reconfigure the BRIX application to obtain certificates from other sources or disable TLS.

````
конец внимание

````
Delete the Cert-manager chart in the namespace \[OBJECT\]:

````
helm uninstall cert-manager -n cert-manager
````