From c8983cb684e53e5fe1d3a945adda2e826ad9ddd2 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Sat, 23 Nov 2019 21:51:41 +0000 Subject: [PATCH] following https://mendoza.io/how-to-run-ghost-in-kubernetes/ --- ghost/deployment.yaml | 25 +++++++++++++++++++++++++ ghost/service.yaml | 12 ++++++++++++ ghost/volume.yaml | 11 +++++++++++ 3 files changed, 48 insertions(+) create mode 100644 ghost/deployment.yaml create mode 100644 ghost/service.yaml create mode 100644 ghost/volume.yaml diff --git a/ghost/deployment.yaml b/ghost/deployment.yaml new file mode 100644 index 0000000..7dcc899 --- /dev/null +++ b/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/ghost/service.yaml b/ghost/service.yaml new file mode 100644 index 0000000..9ecb79e --- /dev/null +++ b/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/ghost/volume.yaml b/ghost/volume.yaml new file mode 100644 index 0000000..0023c51 --- /dev/null +++ b/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