forked from kubernetes-csi/csi-driver-nfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.yaml
52 lines (52 loc) · 967 Bytes
/
nginx.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
apiVersion: v1
kind: PersistentVolume
metadata:
name: data-nfsplugin
labels:
name: data-nfsplugin
spec:
claimRef:
name: data-nfsplugin
namespace: default
accessModes:
- ReadWriteMany
capacity:
storage: 100Gi
csi:
driver: nfs.csi.k8s.io
volumeHandle: data-id
volumeAttributes:
# The nfs server could be a K8s service
# server: nfs-server.default.svc.cluster.local
server: 127.0.0.1
share: /export
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-nfsplugin
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
---
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: maersk/nginx
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/www
name: data-nfsplugin
volumes:
- name: data-nfsplugin
persistentVolumeClaim:
claimName: data-nfsplugin