forked from usri/aks-levelup
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path03-shared-storage.yaml
46 lines (46 loc) · 1013 Bytes
/
03-shared-storage.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
apiVersion: v1
kind: Service
metadata:
name: volumes-lb
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: nginx
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: shared-storage
spec:
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
volumeMounts:
- name: html
mountPath: /usr/share/nginx/html
readOnly: true
- name: index-html-producer
image: nginx:1.14.2
command: [ 'sh', '-c', 'echo "<p>hello from $HOSTNAME</p>" >> /usr/share/nginx/html/index.html && tail -f /dev/null' ]
volumeMounts:
- name: html
mountPath: /usr/share/nginx/html
readOnly: false
volumes:
- name: html
azureFile:
secretName: azure-storage
shareName: data
readOnly: false