Add deployment and service for kind cluster

Signed-off-by: Mihailo <mmarcetic@griddynamcis.com>
This commit is contained in:
Mihailo 2025-03-07 10:13:26 +01:00
parent 0dce1f7d2b
commit 61a75b5570
2 changed files with 37 additions and 0 deletions

22
deployment.yaml Normal file
View file

@ -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

15
service.yaml Normal file
View file

@ -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