feat(ingress): add TLS configuration and cert-manager issuer for nginix

This commit is contained in:
suyiiyii 2024-11-16 00:25:08 +08:00
parent cb4613f913
commit ef6b453246
Signed by: suyiiyii
GPG Key ID: 044704CB29B8AD85
2 changed files with 24 additions and 2 deletions

View File

@ -2,9 +2,15 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginix-ingress
annotations:
cert-manager.io/issuer: "letsencrypt-issuer"
spec:
tls:
- hosts:
- nginix.kl.suyiiyii.top
secretName: nginix-tls
rules:
- host: nginix.example.com
- host: nginix.kl.suyiiyii.top
http:
paths:
- path: /

16
issuer.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-issuer
namespace: default
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: suyiiyii@gmail.com
privateKeySecretRef:
name: letsencrypt-issuer-key
solvers:
- http01:
ingress:
class: nginx