From ce5900131178eb04bfa58323ec81bb400edf49f9 Mon Sep 17 00:00:00 2001 From: zomborip Date: Sun, 5 Oct 2025 19:42:42 +0200 Subject: [PATCH] K8S Config init --- k8s/deployment.yaml | 32 ++++++++++++++++++++++++++++++++ k8s/service.yaml | 19 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 k8s/deployment.yaml create mode 100644 k8s/service.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..adcd8d1 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 + +kind: Deployment + +metadata: + name: go-api + labels: + app: go-api + +spec: + replicas: 2 + + selector: + matchLabels: + app: go-api + + template: + metadata: + labels: + app: go-api + + spec: + containers: + - name: go-api + image: zomborip/go-api:latest + ports: + - containerPort: 8080 + resources: + requests: + cpu: 100m + limits: + cpu: 500m diff --git a/k8s/service.yaml b/k8s/service.yaml new file mode 100644 index 0000000..3f78ddf --- /dev/null +++ b/k8s/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 + +kind: Service + +metadata: + name: go-api + +spec: + selector: + app: go-api + + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 + nodePort: 30081 + + type: NodePort +