95 lines
1.8 KiB
Markdown
95 lines
1.8 KiB
Markdown
# cert-manager
|
|
|
|
- [cloudflare](#cloudflare)
|
|
- [api secrets](#api-secrets)
|
|
- [Cluster Issuer](#cluster-issuer)
|
|
- [Staging](#staging)
|
|
- [Deploy](#deploy)
|
|
- [Describe](#describe)
|
|
- [Production](#production)
|
|
- [Deploy (Production)](#deploy-production)
|
|
- [Describe (Production)](#describe-production)
|
|
- [helm chart](#helm-chart)
|
|
|
|
## cloudflare
|
|
|
|
## api secrets
|
|
|
|
[cloudflare-api-token.yaml](./cloudflare-api-token.yaml).
|
|
|
|
```bash
|
|
set -a
|
|
source ./.env
|
|
set +a
|
|
envsubst < ./cloudflare-api-token.yaml \
|
|
| kubectl apply -n kube-system -f -
|
|
```
|
|
|
|
## Cluster Issuer
|
|
|
|
### Staging
|
|
|
|
#### Deploy
|
|
|
|
[letsencrypt-clusterissuer-staging.yaml](./letsencrypt-clusterissuer-staging.yaml).
|
|
|
|
```bash
|
|
set -a
|
|
source ./.env
|
|
set +a
|
|
envsubst < ./letsencrypt-clusterissuer-staging.yaml \
|
|
| kubectl apply -n kube-system -f -
|
|
```
|
|
|
|
#### Describe
|
|
|
|
```bash
|
|
kubectl describe clusterissuer letsencrypt-staging
|
|
```
|
|
|
|
### Production
|
|
|
|
#### Deploy (Production)
|
|
|
|
[letsencrypt-clusterissuer-prod.yaml](./letsencrypt-clusterissuer-prod.yaml).
|
|
|
|
```bash
|
|
set -a
|
|
source ./.env
|
|
set +a
|
|
envsubst < ./letsencrypt-clusterissuer-prod.yaml \
|
|
| kubectl apply -n kube-system -f -
|
|
```
|
|
|
|
```bash
|
|
set -a
|
|
source ./.env
|
|
set +a
|
|
envsubst < ./letsencrypt-clusterissuer-staging.yaml \
|
|
| kubectl apply -n kube-system -f -
|
|
```
|
|
|
|
#### Describe (Production)
|
|
|
|
```bash
|
|
kubectl describe clusterissuer letsencrypt-prod
|
|
```
|
|
|
|
**Force cert refresh:**
|
|
|
|
``` bash
|
|
kubectl delete certificaterequest -l cert-manager.io/certificate-name=monitoring-limbosolutions-com-tls
|
|
kubectl delete order -l cert-manager.io/certificate-name=monitoring-limbosolutions-com-tls
|
|
```
|
|
|
|
## helm chart
|
|
|
|
``` bash
|
|
helm repo add jetstack https://charts.jetstack.io --force-update
|
|
helm upgrade --install cert-manager jetstack/cert-manager \
|
|
--namespace kube-system \
|
|
--version=v1.20.2 \
|
|
--create-namespace \
|
|
--set crds.enabled=true
|
|
```
|