From e78cbedfa6af95a50b046bc87213b7097a9542ad Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Sun, 3 Apr 2022 03:10:43 +0000 Subject: [PATCH] doc: refine PV doc --- deploy/example/README.md | 14 +++----------- deploy/example/pv-nfs-csi.yaml | 3 ++- deploy/example/pvc-nfs-csi-static.yaml | 2 +- deploy/example/storageclass-nfs.yaml | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/deploy/example/README.md b/deploy/example/README.md index 961510d3..1a0ae313 100644 --- a/deploy/example/README.md +++ b/deploy/example/README.md @@ -1,7 +1,5 @@ # CSI driver example -After the NFS CSI Driver is deployed in your cluster, you can follow this documentation to quickly deploy some examples. - You can use NFS CSI Driver to provision Persistent Volumes statically or dynamically. Please read [Kubernetes Persistent Volumes documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) for more information about Static and Dynamic provisioning. Please refer to [driver parameters](../../docs/driver-parameters.md) for more detailed usage. @@ -35,13 +33,7 @@ kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nf kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pvc-nfs-csi-static.yaml ``` -## Deployment/Statefulset Usage - -- Follow the following command to create `Deployment` and `Statefulset` . - -```bash -# create Deployment and Statefulset -git clone https://github.com/kubernetes-csi/csi-driver-nfs.git -cd csi-driver-nfs -./hack/verify-examples.sh +## Create a deployment +```console +kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/deployment.yaml ``` \ No newline at end of file diff --git a/deploy/example/pv-nfs-csi.yaml b/deploy/example/pv-nfs-csi.yaml index 2f50a2c6..e2f1a65c 100644 --- a/deploy/example/pv-nfs-csi.yaml +++ b/deploy/example/pv-nfs-csi.yaml @@ -9,8 +9,9 @@ spec: accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain + storageClassName: nfs-csi mountOptions: - - nconnect=8 + - nconnect=8 # only supported on linux kernel version >= 5.3 - hard - nfsvers=4.1 csi: diff --git a/deploy/example/pvc-nfs-csi-static.yaml b/deploy/example/pvc-nfs-csi-static.yaml index b52186fd..91a2cf75 100644 --- a/deploy/example/pvc-nfs-csi-static.yaml +++ b/deploy/example/pvc-nfs-csi-static.yaml @@ -10,4 +10,4 @@ spec: requests: storage: 10Gi volumeName: pv-nfs - storageClassName: "" + storageClassName: nfs-csi diff --git a/deploy/example/storageclass-nfs.yaml b/deploy/example/storageclass-nfs.yaml index c84bbaf2..2fd2cdae 100644 --- a/deploy/example/storageclass-nfs.yaml +++ b/deploy/example/storageclass-nfs.yaml @@ -13,6 +13,6 @@ parameters: reclaimPolicy: Delete volumeBindingMode: Immediate mountOptions: - - nconnect=8 + - nconnect=8 # only supported on linux kernel version >= 5.3 - hard - nfsvers=4.1