doc: example for PVC and Pod using a NFS-volume

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2022-03-25 15:19:55 +01:00 committed by mergify[bot]
parent 2743510009
commit b72774f9e9
2 changed files with 29 additions and 0 deletions

17
examples/nfs/pod.yaml Normal file
View File

@ -0,0 +1,17 @@
---
apiVersion: v1
kind: Pod
metadata:
name: cephcsi-nfs-demo-pod
spec:
containers:
- name: web-server
image: docker.io/library/nginx:latest
volumeMounts:
- name: mypvc
mountPath: /var/lib/www
volumes:
- name: mypvc
persistentVolumeClaim:
claimName: cephcsi-nfs-pvc
readOnly: false

12
examples/nfs/pvc.yaml Normal file
View File

@ -0,0 +1,12 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cephcsi-nfs-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: csi-nfs-sc