summaryrefslogtreecommitdiffstats
path: root/seagl2023
diff options
context:
space:
mode:
Diffstat (limited to 'seagl2023')
-rw-r--r--seagl2023/generic.ingress.yaml63
-rw-r--r--seagl2023/k8s.jp.net/example00/Dockerfile2
-rw-r--r--seagl2023/k8s.jp.net/example00/html/index.html16
-rw-r--r--seagl2023/k8s.jp.net/example00/html/seagl.lounging.pngbin0 -> 54027 bytes
-rw-r--r--seagl2023/k8s.jp.net/example01/Dockerfile2
-rw-r--r--seagl2023/k8s.jp.net/example01/html/index.html14
-rw-r--r--seagl2023/k8s.jp.net/example01/html/seagl.left.pngbin0 -> 45982 bytes
-rw-r--r--seagl2023/k8s.jp.net/example01/html/seagl.right.pngbin0 -> 30768 bytes
-rw-r--r--seagl2023/k8s.jp.net/ingress.yaml76
-rw-r--r--seagl2023/k8s.jp.net/seagl00.yaml37
-rw-r--r--seagl2023/k8s.jp.net/seagl01.yaml37
11 files changed, 247 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
diff --git a/seagl2023/k8s.jp.net/example00/Dockerfile b/seagl2023/k8s.jp.net/example00/Dockerfile
new file mode 100644
index 0000000..f4f377c
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example00/Dockerfile
@@ -0,0 +1,2 @@
+FROM nginx
+COPY html /usr/share/nginx/html
diff --git a/seagl2023/k8s.jp.net/example00/html/index.html b/seagl2023/k8s.jp.net/example00/html/index.html
new file mode 100644
index 0000000..e56fa18
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example00/html/index.html
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <title>woah!</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <style type = "text/css">
+ body {
+ background-image: url("seagl.lounging.png");
+ background-repeat: repeat;
+ }
+ </style>
+ </head>
+ <body>
+ <br>
+ <center><H1 style="color: #F5F; font-size: 28vh; text-shadow: 6px 6px #548abb;">greetings, earthlings of SeaGL</H1></center>
+ </body>
+</html>
diff --git a/seagl2023/k8s.jp.net/example00/html/seagl.lounging.png b/seagl2023/k8s.jp.net/example00/html/seagl.lounging.png
new file mode 100644
index 0000000..fd911e4
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example00/html/seagl.lounging.png
Binary files differ
diff --git a/seagl2023/k8s.jp.net/example01/Dockerfile b/seagl2023/k8s.jp.net/example01/Dockerfile
new file mode 100644
index 0000000..f4f377c
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example01/Dockerfile
@@ -0,0 +1,2 @@
+FROM nginx
+COPY html /usr/share/nginx/html
diff --git a/seagl2023/k8s.jp.net/example01/html/index.html b/seagl2023/k8s.jp.net/example01/html/index.html
new file mode 100644
index 0000000..695a270
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example01/html/index.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <title>woah!</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <style type = "text/css">
+ body {
+ background-color: lightgreen;
+ }
+ </style>
+ </head>
+ <body>
+ <center><p style="color: #F5F; font-size: 22vh; text-shadow: 6px 6px #548abb;"><img src="seagl.left.png" style="display: inline;">the second example!<img src="seagl.right.png" style="display: inline;"></p></center>
+ </body>
+</html>
diff --git a/seagl2023/k8s.jp.net/example01/html/seagl.left.png b/seagl2023/k8s.jp.net/example01/html/seagl.left.png
new file mode 100644
index 0000000..2f05f37
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example01/html/seagl.left.png
Binary files differ
diff --git a/seagl2023/k8s.jp.net/example01/html/seagl.right.png b/seagl2023/k8s.jp.net/example01/html/seagl.right.png
new file mode 100644
index 0000000..4143fa9
--- /dev/null
+++ b/seagl2023/k8s.jp.net/example01/html/seagl.right.png
Binary files differ
diff --git a/seagl2023/k8s.jp.net/ingress.yaml b/seagl2023/k8s.jp.net/ingress.yaml
new file mode 100644
index 0000000..444a88e
--- /dev/null
+++ b/seagl2023/k8s.jp.net/ingress.yaml
@@ -0,0 +1,76 @@
+---
+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: "seagl00.k8s.jp.net"
+ http:
+ paths:
+ - pathType: Prefix
+ path: "/"
+ backend:
+ service:
+ name: seagl00-k8s-jp-net
+ port:
+ number: 80
+ - host: "seagl01.k8s.jp.net"
+ http:
+ paths:
+ - pathType: Prefix
+ path: "/"
+ backend:
+ service:
+ name: seagl01-k8s-jp-net
+ port:
+ number: 80
+ tls:
+ - hosts:
+ - seagl00.k8s.jp.net
+ secretName: seag00-k8s-jp-net-tls
+ - hosts:
+ - seagl01.k8s.jp.net
+ secretName: seag01-k8s-jp-net-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
diff --git a/seagl2023/k8s.jp.net/seagl00.yaml b/seagl2023/k8s.jp.net/seagl00.yaml
new file mode 100644
index 0000000..a48be57
--- /dev/null
+++ b/seagl2023/k8s.jp.net/seagl00.yaml
@@ -0,0 +1,37 @@
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: seagl00-k8s-jp-net
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: seagl00-k8s-jp-net
+ template:
+ metadata:
+ labels:
+ app: seagl00-k8s-jp-net
+ spec:
+ containers:
+ - name: seagl00-k8s-jp-net
+ image: microk8s.sideload/seagl00.k8s.jp.net:v000
+ ports:
+ - name: http
+ containerPort: 80
+ nodeSelector:
+ kubernetes.io/os: linux
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: seagl00-k8s-jp-net
+spec:
+ ports:
+ - name: http
+ port: 80
+ protocol: TCP
+ targetPort: 80
+ selector:
+ app: seagl00-k8s-jp-net
+ type: ClusterIP
diff --git a/seagl2023/k8s.jp.net/seagl01.yaml b/seagl2023/k8s.jp.net/seagl01.yaml
new file mode 100644
index 0000000..60bae65
--- /dev/null
+++ b/seagl2023/k8s.jp.net/seagl01.yaml
@@ -0,0 +1,37 @@
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: seagl01-k8s-jp-net
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: seagl01-k8s-jp-net
+ template:
+ metadata:
+ labels:
+ app: seagl01-k8s-jp-net
+ spec:
+ containers:
+ - name: seagl01-k8s-jp-net
+ image: microk8s.sideload/seagl01.k8s.jp.net:v000
+ ports:
+ - name: http
+ containerPort: 80
+ nodeSelector:
+ kubernetes.io/os: linux
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: seagl01-k8s-jp-net
+spec:
+ ports:
+ - name: http
+ port: 80
+ protocol: TCP
+ targetPort: 80
+ selector:
+ app: seagl01-k8s-jp-net
+ type: ClusterIP