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