From 0a9aad30fb93dac8aefa44e9312361f3dd89ee84 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 24 Mar 2024 13:41:55 -0700 Subject: [PATCH] Cluster configuration with working TLS for 1 domain but not two --- .../k8s/alternate.temprah-lab.xyz/tls.yaml | 30 +++++++++++++ infra/vultr-kubernetes/k8s/tls.yaml | 45 ++++++++++++------- 2 files changed, 60 insertions(+), 15 deletions(-) create mode 100644 infra/vultr-kubernetes/k8s/alternate.temprah-lab.xyz/tls.yaml diff --git a/infra/vultr-kubernetes/k8s/alternate.temprah-lab.xyz/tls.yaml b/infra/vultr-kubernetes/k8s/alternate.temprah-lab.xyz/tls.yaml new file mode 100644 index 0000000..de71470 --- /dev/null +++ b/infra/vultr-kubernetes/k8s/alternate.temprah-lab.xyz/tls.yaml @@ -0,0 +1,30 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: hello.temprah-lab.xyz + namespace: default +spec: + secretName: hello.temprah-lab.xyz-tls + issuerRef: + name: letsencrypt-prod + kind: ClusterIssuer + commonName: hello.temprah-lab.xyz + dnsNames: + - hello.temprah-lab.xyz +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-prod-hello + namespace: default +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: dev@shockrah.xyz + privateKeySecretRef: + name: letsencrypt-prod-hello + solvers: + - http01: + ingress: + class: traefik + diff --git a/infra/vultr-kubernetes/k8s/tls.yaml b/infra/vultr-kubernetes/k8s/tls.yaml index afcc7fc..03afaf5 100644 --- a/infra/vultr-kubernetes/k8s/tls.yaml +++ b/infra/vultr-kubernetes/k8s/tls.yaml @@ -1,17 +1,4 @@ -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 ---- +# This is the first thing we need to create, an issue to put certs into apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: @@ -22,8 +9,36 @@ spec: server: https://acme-v02.api.letsencrypt.org/directory email: dev@shockrah.xyz privateKeySecretRef: - name: letsencrypt-prod + name: letsencrypt-temprah-lab solvers: - http01: ingress: class: traefik +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: hello.temprah-lab.xyz + namespace: default +spec: + secretName: hello.temprah-lab.xyz-tls + issuerRef: + name: letsencrypt-temprah-lab + kind: ClusterIssuer + commonName: hello.temprah-lab.xyz + dnsNames: + - hello.temprah-lab.xyz +--- +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-temprah-lab + kind: ClusterIssuer + commonName: sample.temprah-lab.xyz + dnsNames: + - sample.temprah-lab.xyz