forked from microsoft/WhatTheHack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisk-deployment.yaml
63 lines (61 loc) · 1.25 KB
/
disk-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: disk-app
spec:
replicas: 1
selector:
matchLabels:
app: disk-app
template:
metadata:
labels:
app: disk-app
spec:
containers:
- name: busybox-writer
image: busybox
command:
- sh
- -c
- "while true; do sleep 1; echo $(date +%Y-%m-%d:%H:%M:%S) - $(hostname) >> /mnt/index.html; done"
resources:
limits:
memory: "128Mi"
cpu: "50m"
volumeMounts:
- mountPath: /mnt
name: managed-disk-volume
- name: busybox-web
image: busybox
command:
- sh
- -c
- "httpd -p 80 -f -v -h /mnt"
resources:
limits:
memory: "128Mi"
cpu: "50m"
ports:
- containerPort: 80
volumeMounts:
- mountPath: /mnt
name: managed-disk-volume
volumes:
- name: managed-disk-volume
azureDisk:
kind: Managed
diskName: <disk name>
diskURI: <disk resource ID>
---
apiVersion: v1
kind: Service
metadata:
name: disk-app
spec:
selector:
app: disk-app
ports:
- port: 80
targetPort: 80
type: LoadBalancer