-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor nginx service, TLS support with Letsencrypt and certmanager …
…with fallback with custom certs - Changed the service type from LoadBalancer to ClusterIP in the nginx service configuration. - Updated the containerPort in the nginx deployment configuration from 8082 to 80. - Added new files for cert-manager configuration: certificate.yaml and cluster-issuer.yml. - Created an ingress configuration for nginx with SSL redirection and rewrite rules.
- Loading branch information
Showing
7 changed files
with
62 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: rengine-cert | ||
namespace: default | ||
spec: | ||
secretName: rengine-tls | ||
issuerRef: | ||
name: letsencrypt-prod | ||
kind: ClusterIssuer | ||
dnsNames: | ||
- rengine.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: letsencrypt-prod | ||
spec: | ||
acme: | ||
server: https://acme-v02.api.letsencrypt.org/directory | ||
email: [email protected] | ||
privateKeySecretRef: | ||
name: letsencrypt-prod | ||
solvers: | ||
- http01: | ||
ingress: | ||
class: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: nginx-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/ssl-redirect: "true" | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
nginx.ingress.kubernetes.io/proxy-body-size: "800m" | ||
nginx.ingress.kubernetes.io/proxy-read-timeout: "300" | ||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" | ||
nginx.ingress.kubernetes.io/whitelist-source-range: "0.0.0.0/0" | ||
acme.cert-manager.io/http01-edit-in-place: "true" | ||
cert-manager.io/cluster-issuer: letsencrypt-prod | ||
spec: | ||
ingressClassName: nginx | ||
tls: | ||
- hosts: | ||
- rengine.example.com | ||
secretName: rengine-tls | ||
rules: | ||
- host: rengine.example.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: nginx | ||
port: | ||
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters