-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdemo21.yaml
70 lines (70 loc) · 1.26 KB
/
demo21.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
# https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: azure-managed-disk
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-premium
resources:
requests:
storage: 5Gi
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: files
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: files.gp.kaluzny.io
http:
paths:
- backend:
serviceName: files
servicePort: 80
path: /
---
apiVersion: v1
kind: Service
metadata:
name: files
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: files
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: files
spec:
selector:
matchLabels:
app: files
replicas: 24
template:
metadata:
labels:
app: files
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
name: http
protocol: TCP
volumeMounts:
- name: demo
mountPath: /usr/share/nginx/html
volumes:
- name: demo
persistentVolumeClaim:
claimName: azure-managed-disk