---
# System prepended metadata

title: Deploy cert-manager into K8s cluster

---

# Deploy cert-manager into K8s cluster

## Goal
Add [cert-manager](https://docs.cert-manager.io/en/latest/) to `mixing` and `prod` clusters.

## k8s-addons-configs
Deployment files need to be put in `k8s-addons-configs` repo.

### Make a new branch and use VSCode
```
$ export NAME=add-cert-manager
$ git branch $NAME
$ git checkout $NAME

$ git add
$ git commit -m "Add things"
$ git push -u origin $NAME
```

### Use kustomize 2.0.3
[link](https://issuetracking.maaii.com:9443/display/CN/kustomize+multi-versions+with+brew+on+mac)

[kustomize](https://github.com/kubernetes-sigs/kustomize)

```
$ brew switch kustomize 2.0.3
Cleaning /usr/local/Cellar/kustomize/3.1.0
Cleaning /usr/local/Cellar/kustomize/2.0.3
1 links created for /usr/local/Cellar/kustomize/3.1.0
```

### Setup k8s-addons-configs
```
k8s-addons-configs/base/cert-manager/
├── 00.cert-manager.yaml
├── 01.ns.yaml
├── README.md
└── kustomization.yaml

k8s-addons-configs/mixing/cert-manager/
└── kustomization.yaml

k8s-addons-configs/production/cert-manager/
└── kustomization.yaml
```

### 
```
// Mixing cluster
// Directory k8s-addons-configs/mixing/cert-manager 
$ kustomize build | kubectl apply -f -
```