-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeployment.yaml
More file actions
70 lines (69 loc) · 1.9 KB
/
Copy pathDeployment.yaml
File metadata and controls
70 lines (69 loc) · 1.9 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
apiVersion: apps/v1
kind: Deployment
metadata:
name: some-deployment
labels:
app: some-app
role: backend
spec:
replicas: 1
selector:
matchLabels:
app: some-app
template:
metadata:
labels:
app: some-app
role: backend
spec:
containers:
- name: nginx
image: nginx:1.17.8-alpine
ports:
- containerPort: 80
name: http
env:
- name: APPLICATION_NAME
value: "some-app"
volumeMounts:
- name: www
mountPath: /usr/share/nginx/html
livenessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 10 # Liveness probe waits 10 seconds before first check
periodSeconds: 10 # Run every 10 seconds
timeoutSeconds: 5 # Probe times out after 5 seconds
failureThreshold: 6 # Fail after 6 consecutive failures
readinessProbe:
httpGet:
path: /ready
port: 80
initialDelaySeconds: 15 # Readiness probe waits 15 seconds before first check
periodSeconds: 10 # Run every 10 seconds
timeoutSeconds: 5 # Probe times out after 5 seconds
failureThreshold: 6 # Fail after 6 consecutive failures
resources:
limits:
memory: "512Mi" # Limit memory usage to 512Mi
cpu: "500m" # Limit CPU usage to 500 millicores
requests:
memory: "256Mi" # Request 256Mi of memory
cpu: "250m" # Request 250 millicores of CPU
volumes:
- name: www
persistentVolumeClaim:
claimName: some-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: some-claim
spec:
accessModes:
- ReadWriteOnce
storageClassName: my-storage-class
resources:
requests:
storage: 1Gi