-
Notifications
You must be signed in to change notification settings - Fork 166
/
04-deployment.yaml
45 lines (45 loc) · 931 Bytes
/
04-deployment.yaml
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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: openresty
namespace: q-test
labels:
app: openresty
spec:
replicas: 3
revisionHistoryLimit: 3
selector:
matchLabels:
app: openresty
template:
metadata:
labels:
app: openresty
spec:
containers:
- name: openresty
image: openresty/openresty:centos-rpm
imagePullPolicy: IfNotPresent
env:
- name: NGINX_HOST
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
requests:
cpu: "0.1"
memory: "100Mi"
limits:
cpu: "0.2"
memory: "300Mi"
ports:
- containerPort: 80
name: http
protocol: TCP
volumeMounts:
- name: empty-volume
mountPath: /empty
volumes:
- name: empty-volume
emptyDir: {}