mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 11:22:49 +00:00
Add deployment and service for kind cluster
Signed-off-by: Mihailo <mmarcetic@griddynamcis.com>
This commit is contained in:
parent
0dce1f7d2b
commit
61a75b5570
2 changed files with 37 additions and 0 deletions
22
deployment.yaml
Normal file
22
deployment.yaml
Normal 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
15
service.yaml
Normal 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
|
||||
|
Loading…
Reference in a new issue