-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk8s-deployment.yaml
More file actions
41 lines (41 loc) · 964 Bytes
/
k8s-deployment.yaml
File metadata and controls
41 lines (41 loc) · 964 Bytes
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-k8s-deployment
namespace: lab-k8s
labels:
app: demo-k8s
spec:
replicas: 2
selector:
matchLabels:
app: demo-k8s
template:
metadata:
labels:
app: demo-k8s
spec:
containers:
- name: demo-k8s-container
image: demo-k8s:1.0.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
env:
- name: APP_MESSAGE
valueFrom:
configMapKeyRef:
name: demo-k8s-config
key: app.message
readinessProbe:
httpGet:
path: /api/hello
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
livenessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 60
periodSeconds: 15