From cade114ab6aa164d3997b78f3316cd59f9d1503f Mon Sep 17 00:00:00 2001 From: sedimentt Date: Tue, 25 Aug 2026 16:41:45 +0300 Subject: [PATCH] create k8s --- k8s/deployment.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 k8s/deployment.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..ee344a7 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,39 @@ +apiVersion: apps/v1 +kind: Deployment + +metadata: + name: book-api + namespace: book-api + +spec: + replicas: 3 + + selector: + matchLabels: + app: book-api + + template: + metadata: + labels: + app: book-api + + spec: + containers: + - name: book-api + image: ghcr.io/sedimentt/book-api:latest + ports: + - containerPort: 8080 + + livenessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 10 + + readinessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 5 \ No newline at end of file