feat(ingress): add TLS configuration and cert-manager issuer for nginix
This commit is contained in:
parent
cb4613f913
commit
ef6b453246
10
ingress.yaml
10
ingress.yaml
@ -2,9 +2,15 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: nginix-ingress
|
name: nginix-ingress
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/issuer: "letsencrypt-issuer"
|
||||||
spec:
|
spec:
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- nginix.kl.suyiiyii.top
|
||||||
|
secretName: nginix-tls
|
||||||
rules:
|
rules:
|
||||||
- host: nginix.example.com
|
- host: nginix.kl.suyiiyii.top
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
@ -13,4 +19,4 @@ spec:
|
|||||||
service:
|
service:
|
||||||
name: nginix-service
|
name: nginix-service
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
16
issuer.yaml
Normal file
16
issuer.yaml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user