-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_deployment.yml
45 lines (45 loc) · 958 Bytes
/
_deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
kind: Deployment
apiVersion: apps/v1
metadata:
name: spring-boot-k8s
spec:
replicas: 2
selector:
matchLabels:
app: spring-boot-k8s
template:
metadata:
labels:
app: spring-boot-k8s
spec:
containers:
- name: spring-boot-k8s
image: jaikratsingh/spring-boot-k8s:first-spring-image
imagePullPolicy: Always
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 5
livenessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 5
restartPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
name: spring-boot-k8s
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
protocol: TCP
nodePort: 31000
selector:
app: spring-boot-app