Working sample project with full tls and nginx container

This commit is contained in:
shockrah 2024-02-21 23:13:40 -08:00
parent 5409586c18
commit 61e2a8d2aa
3 changed files with 27 additions and 4 deletions

View File

@ -48,5 +48,15 @@ kubectl --kubeconfig config.yaml \
-f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.yaml -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.yaml
``` ```
# Create the cert issuer and certificate
```sh
kubectl --kubeconfig config.yaml apply -f k8s/letsencrypt-issuer.yaml
kubectl --kubeconfig config.yaml apply -f k8s/letsencrypt-issuer.yaml
```
Because we just have 1 cert for now we are looking for it's status to be `READY`

View File

@ -0,0 +1,13 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: sample.temprah-lab.xyz
namespace: default
spec:
secretName: sample.temprah-lab.xyz-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
commonName: sample.temprah-lab.xyz
dnsNames:
- sample.temprah-lab.xyz

View File

@ -1,15 +1,15 @@
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
kind: ClusterIssuer kind: ClusterIssuer
metadata: metadata:
name: letencrypt-prod name: letsencrypt-prod
namespace: default namespace: default
spec: spec:
acme: acme:
server: https://acme-v02.api.letsencrypt.org/directory server: https://acme-v02.api.letsencrypt.org/directory
email: dev@shockrah.xyz email: dev@shockrah.xyz
privateKeySecretRef: privateKeySecretRef:
name: letencrypt-prod name: letsencrypt-prod
solvers: solvers:
- http01: - http01:
ingress: ingress:
class: traefik class: traefik