> For the complete documentation index, see [llms.txt](https://utm-1.gitbook.io/utm-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/prilozheniya/cert-manager.md).

# cert-manager

## Ссылки

менеджер сертификатов: [artifacthub.io](https://artifacthub.io/packages/helm/cert-manager/cert-manager)

Helm: [cert-manager.io](https://cert-manager.io/docs/installation/helm/)

## Установка

### Установка через Argo CD

В github в репозитории argocd в каталоге `env-prod\apps` создать подкаталог `cert-manager` в котором создать файл `app.yaml` следующего содержания:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name     : cert-manager
  namespace: argocd
spec:
  project: default
  destination:
    name     : in-cluster
    namespace: cert-manager
  sources:
  - repoURL: git@github.com:utenkov-maxim/argocd.git
    targetRevision: HEAD
    ref: values
  - chart: cert-manager
    repoURL: https://charts.jetstack.io
    targetRevision: v1.19.2
    helm:
      releaseName: cert-manager
      valueFiles:
      - $values/env-prod/apps/cert-manager/values.yaml
  - repoURL: git@github.com:utenkov-maxim/argocd.git
    targetRevision: HEAD
    path: "env-prod/apps/cert-manager/manifests"
  syncPolicy:
    automated:
      prune   : true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true
```

В каталоге `cert-manager` создать файл values.yaml на основе [стандартного файла](https://artifacthub.io/packages/helm/cert-manager/cert-manager)

В стандартный файл внести следующие изменения:

```yaml
crds:
  # This option decides if the CRDs should be installed
  # as part of the Helm installation.
  enabled: true    #!!! Было false

replicaCount: 2     #!!! Было 1

podDisruptionBudget:
  # Enable or disable the PodDisruptionBudget resource.
  #
  # This prevents downtime during voluntary disruptions such as during a Node upgrade.
  # For example, the PodDisruptionBudget will block `kubectl drain`
  # if it is used on the Node where the only remaining cert-manager
  # Pod is currently running.
  enabled: true   #!!! Было false
```

В каталоге `cert-manager` создать подкаталог `manifests` в котором создать следующие файлы:

letsencrypt-prod.yaml

```yaml
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: utenkov@list.ru
    privateKeySecretRef:
      name: letsencrypt-prod
    solvers:
    - http01:
        ingress:
          class: nginx
```

Сделать коммит в github. После этого Argo CD развернет cert-manager в связанном кластере Kubernetes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/prilozheniya/cert-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
