summaryrefslogtreecommitdiffstats
path: root/seagl2023/generic.ingress.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'seagl2023/generic.ingress.yaml')
-rw-r--r--seagl2023/generic.ingress.yaml63
1 files changed, 63 insertions, 0 deletions
diff --git a/seagl2023/generic.ingress.yaml b/seagl2023/generic.ingress.yaml
new file mode 100644
index 0000000..632bb4c
--- /dev/null
+++ b/seagl2023/generic.ingress.yaml
@@ -0,0 +1,63 @@
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: nginx-ingress-microk8s
+ annotations:
+ kubernetes.io/ingress.class: public
+ ingressclass.kubernetes.io/is-default-class: "true"
+ cert-manager.io/cluster-issuer: letsencrypt
+ nginx.ingress.kubernetes.io/enable-modsecurity: "true"
+ nginx.ingress.kubernetes.io/enable-owasp-core-rules: "true"
+ nginx.ingress.kubernetes.io/modsecurity-transaction-id: "$request_id"
+ nginx.ingress.kubernetes.io/modsecurity-snippet: |
+ SecRuleEngine On
+spec:
+ rules:
+ - host: "example.com"
+ http:
+ paths:
+ - pathType: Prefix
+ path: "/"
+ backend:
+ service:
+ name: example-com
+ port:
+ number: 80
+ tls:
+ - hosts:
+ - example.com
+ secretName: example-com-tls
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: ingress
+spec:
+ selector:
+ name: nginx-ingress-microk8s
+ ports:
+ - name: http
+ protocol: TCP
+ port: 80
+ targetPort: 80
+---
+apiVersion: cert-manager.io/v1
+kind: ClusterIssuer
+metadata:
+ name: letsencrypt
+spec:
+ acme:
+ # You must replace this email address with your own.
+ # Let's Encrypt will use this to contact you about expiring
+ # certificates, and issues related to your account.
+ email: seagl2023@jpnc.info
+ server: https://acme-v02.api.letsencrypt.org/directory
+ privateKeySecretRef:
+ # Secret resource that will be used to store the account's private key.
+ name: letsencrypt-account-key
+ # Add a single challenge solver, HTTP01 using nginx
+ solvers:
+ - http01:
+ ingress:
+ class: public