using ClusterIP with ingress instead of NodePort

This commit is contained in:
2024-06-26 00:59:06 +10:00
parent 91a305117c
commit 16d9f1df34
2 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dokuwiki-ingress
namespace: dokuwiki
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
ingressClassName: nginx
rules:
- host: "dokuwiki.cluster.local"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: dokuwiki-dokuwiki
port:
number: 18000
- host: "dokuwiki.cluster.edward.sydney"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: dokuwiki-dokuwiki
port:
number: 18000

View File

@@ -25,5 +25,7 @@ spec:
persistence:
existingClaim: "dokuwiki-pvc"
service:
nodePorts:
http: 18000
type: ClusterIP
ports:
http: 18000
https: 18443