From b72774f9e97d18b5f011016cc71a4cc06eaaf8b5 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 25 Mar 2022 15:19:55 +0100 Subject: [PATCH] doc: example for PVC and Pod using a NFS-volume Signed-off-by: Niels de Vos --- examples/nfs/pod.yaml | 17 +++++++++++++++++ examples/nfs/pvc.yaml | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 examples/nfs/pod.yaml create mode 100644 examples/nfs/pvc.yaml diff --git a/examples/nfs/pod.yaml b/examples/nfs/pod.yaml new file mode 100644 index 000000000..9c1217408 --- /dev/null +++ b/examples/nfs/pod.yaml @@ -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 diff --git a/examples/nfs/pvc.yaml b/examples/nfs/pvc.yaml new file mode 100644 index 000000000..8f4fca12a --- /dev/null +++ b/examples/nfs/pvc.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: cephcsi-nfs-pvc +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi + storageClassName: csi-nfs-sc