-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_deployment.yaml
45 lines (45 loc) · 1015 Bytes
/
nginx_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: nginx
labels:
tier: backend
spec:
replicas: 2
selector:
matchLabels:
app: nginx
tier: backend
template:
metadata:
labels:
app: nginx
tier: backend
spec:
containers:
- name: nginx
image: nginx:1.23
ports:
- containerPort: 80
volumeMounts:
- name: local-pv-storage
mountPath: "/usr/share/nginx/html"
- name: config
mountPath: /etc/nginx/conf.d
resources: # You need to specify the metric the HPA object will reference
requests:
memory: "64Mi"
cpu: "125m"
limits:
memory: "128Mi"
cpu: "250m"
volumes:
- name: local-pv-storage
persistentVolumeClaim:
claimName: local-pv-claim
- name: config
configMap:
name: nginx-config
items:
- key: config
path: site.conf