From 61a75b5570c77d1677fa056012ded8747dc90fab Mon Sep 17 00:00:00 2001 From: Mihailo Date: Fri, 7 Mar 2025 10:13:26 +0100 Subject: [PATCH] Add deployment and service for kind cluster Signed-off-by: Mihailo --- deployment.yaml | 22 ++++++++++++++++++++++ service.yaml | 15 +++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 deployment.yaml create mode 100644 service.yaml diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 000000000..f9c23ef7b --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: spring-boot-app + namespace: petclinic +spec: + replicas: 2 + selector: + matchLabels: + app: spring-boot-app + template: + metadata: + labels: + app: spring-boot-app + spec: + containers: + - name: spring-boot-app + image: docker.io/mmarcetic/main:2.0 + imagePullPolicy: Always + ports: + - containerPort: 8080 + diff --git a/service.yaml b/service.yaml new file mode 100644 index 000000000..e0547ec6a --- /dev/null +++ b/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: spring-boot-app-service + namespace: petclinic +spec: + selector: + app: spring-boot-app + ports: + - protocol: TCP + port: 80 + targetPort: 8080 + nodePort: 30950 + type: NodePort +