From cc97de3e8989c7ba3639667c26bd4f829079f84d Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Tue, 24 Aug 2021 10:04:42 +0930 Subject: [PATCH] added kubernetes deployment --- delpoyment.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 delpoyment.yaml diff --git a/delpoyment.yaml b/delpoyment.yaml new file mode 100644 index 0000000..dea1ff0 --- /dev/null +++ b/delpoyment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simple-blog-api + labels: + app: python +spec: + replicas: 3 + selector: + matchLabels: + app: python + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 33% + template: + metadata: + labels: + app: python + spec: + containers: + - name: python + image: inkletblot/simple-blog-api: + ports: + - containerPort: 5000 + livenessProbe: + httpGet: + path: /posts + port: 5000 + initialDelaySeconds: 2 + periodSeconds: 2 + readinessProbe: + httpGet: + path: /posts + port: 5000 + initialDelaySeconds: 2 + periodSeconds: 2 \ No newline at end of file