diff --git a/MisterBiggs/anson-k8s/README.md b/MisterBiggs/anson-k8s/README.md new file mode 100644 index 000000000..3b9309f85 --- /dev/null +++ b/MisterBiggs/anson-k8s/README.md @@ -0,0 +1,2 @@ +# anson-k8s + -- 2.51.2 From 73f20794cf5518bc83b8b4490f07197c718055ff Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Sat, 23 Nov 2019 21:51:41 +0000 Subject: [PATCH 2/2] following https://mendoza.io/how-to-run-ghost-in-kubernetes/ --- MisterBiggs/anson-k8s/ghost/deployment.yaml | 25 +++++++++++++++++++++ MisterBiggs/anson-k8s/ghost/service.yaml | 12 ++++++++++ MisterBiggs/anson-k8s/ghost/volume.yaml | 11 +++++++++ 3 files changed, 48 insertions(+) create mode 100644 MisterBiggs/anson-k8s/ghost/deployment.yaml create mode 100644 MisterBiggs/anson-k8s/ghost/service.yaml create mode 100644 MisterBiggs/anson-k8s/ghost/volume.yaml diff --git a/MisterBiggs/anson-k8s/ghost/deployment.yaml b/MisterBiggs/anson-k8s/ghost/deployment.yaml new file mode 100644 index 000000000..7dcc8992f --- /dev/null +++ b/MisterBiggs/anson-k8s/ghost/deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: blog + labels: + app: blog +spec: + replicas: 1 + selector: + matchLabels: + app: blog + template: + metadata: + labels: + app: blog + spec: + containers: + - name: blog + image: ghost:latest + imagePullPolicy: Always + ports: + - containerPort: 2368 + env: + - name: url + value: http://my-blog.com diff --git a/MisterBiggs/anson-k8s/ghost/service.yaml b/MisterBiggs/anson-k8s/ghost/service.yaml new file mode 100644 index 000000000..9ecb79e68 --- /dev/null +++ b/MisterBiggs/anson-k8s/ghost/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: blog +spec: + type: LoadBalancer + selector: + app: blog + ports: + - protocol: TCP + port: 80 + targetPort: 2368 diff --git a/MisterBiggs/anson-k8s/ghost/volume.yaml b/MisterBiggs/anson-k8s/ghost/volume.yaml new file mode 100644 index 000000000..0023c515f --- /dev/null +++ b/MisterBiggs/anson-k8s/ghost/volume.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: blog-content +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: do-block-storage