-
Notifications
You must be signed in to change notification settings - Fork 0
/
guestbook-deployment.yaml
72 lines (64 loc) · 1.37 KB
/
guestbook-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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#Secret
apiVersion: v1
data:
secret: VGhpcyBpcyBhIHNlY3JldAo=
kind: Secret
metadata:
name: super-secret
---
#ConfigMap
apiVersion: v1
data:
cm.value1: Hello Prague!
cm.value2: Glad to be here!
kind: ConfigMap
metadata:
name: oss-prague-config
---
#Pod with Volume
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: guestbook
labels:
app: guestbook
spec:
replicas: 3
template:
metadata:
labels:
app: guestbook
spec:
containers:
- name: guestbook
image: bsteciuk/guestbook:v1.4
env:
- name: CM_VALUE1
valueFrom:
configMapKeyRef:
name: oss-prague-config
key: cm.value1
- name: CM_VALUE2
valueFrom:
configMapKeyRef:
name: oss-prague-config
key: cm.value2
- name: SUPER_SECRET
valueFrom:
secretKeyRef:
name: super-secret
key: secret
ports:
- name: http-server
containerPort: 3000
protocol: TCP
volumeMounts:
- name: guestapp-volume
mountPath: C:/app/data
volumes:
- name: guestapp-volume
hostPath:
#directory location on host
path: C:/guestapp-mount
nodeSelector:
beta.kubernetes.io/os: windows