-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
35 lines (35 loc) · 869 Bytes
/
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app.kubernetes.io/name: nginx
template:
metadata:
labels:
app.kubernetes.io/name: nginx
spec:
serviceAccountName: service-reader
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 50
protocol: TCP
env:
- name: SERVICE_NAME
value: nginx-service
volumeMounts:
- mountPath: /docker-entrypoint.sh
name: nginx-config
subPath: docker-entrypoint.sh
volumes:
- name: nginx-config
configMap:
name: nginx-config
defaultMode: 0744
items:
- key: docker-entrypoint.sh
path: docker-entrypoint.sh