-
Notifications
You must be signed in to change notification settings - Fork 2
/
node-deploy.yml
67 lines (67 loc) · 1.5 KB
/
node-deploy.yml
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
apiVersion: v1
kind: Service
metadata:
name: nodejs
labels:
app: nodejs
group: certificate-example
spec:
type: ClusterIP
ports:
- port: 443
targetPort: 8443
name: https
selector:
app: nodejs
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nodejs
labels:
app: nodejs
group: certificate-example
spec:
replicas: 1
selector:
matchLabels:
app: nodejs
template:
metadata:
labels:
app: nodejs
spec:
containers:
- name: nodejs
image: voor/node-service:latest
env:
- name: SERVER_SSL_KEY
valueFrom:
secretKeyRef:
name: server-cert
key: tls.key
- name: SERVER_SSL_CERT
valueFrom:
secretKeyRef:
name: server-cert
key: tls.crt
- name: NODE_PORT
value: "8443"
- name: NODE_EXTRA_CA_CERTS
value: "/etc/ssl/certs/ca-certificates.crt"
- name: OTHER_SERVER_HOST
value: "java.default.svc.cluster.local"
- name: OTHER_SERVER_PORT
value: "443"
ports:
- name: https
containerPort: 8443
protocol: TCP
volumeMounts:
- name: castore
mountPath: "/etc/ssl/certs"
readOnly: true
volumes:
- name: castore
secret:
secretName: castore