-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathlinginx-v2.yaml
57 lines (57 loc) · 1.11 KB
/
linginx-v2.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
46
47
48
49
50
51
52
53
54
55
56
57
apiVersion: apps/v1
kind: Deployment
metadata:
name: linginx2
labels:
deployment: linginx2
spec:
replicas: 1
selector:
matchLabels:
deployment: linginx2
template:
metadata:
labels:
deployment: linginx2
spec:
containers:
- image: docker.io/nginx
name: linginx2
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
volumeMounts:
- mountPath: "/etc/nginx/ssl"
name: tls-certs
- mountPath: "/etc/nginx/conf.d"
name: configmap-volume
volumes:
- name: tls-certs
secret:
secretName: linginx-certs
- name: configmap-volume
configMap:
name: nginxconfigmap
serviceAccount: linginx-sa
serviceAccountName: linginx-sa
---
apiVersion: v1
kind: Service
metadata:
labels:
deployment: linginx2
name: linginx2
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
- name: https
port: 8443
protocol: TCP
targetPort: 8443
selector:
deployment: linginx2