Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.53 KB

README.md

File metadata and controls

36 lines (23 loc) · 1.53 KB

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 for more information about Static and Dynamic provisioning.

Please refer to driver parameters for more detailed usage.

Prerequisite

Storage Class Usage (Dynamic Provisioning)

  • Follow the folling command to create a StorageClass, and then PersistentVolume and PersistentVolumeClaim dynamically.
# create StorageClass
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/storageclass-nfs.yaml

# create PVC
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pvc-nfs-csi-dynamic.yaml

PV/PVC Usage (Static Provisioning)

  • Follow the folling command to create PersistentVolume and PersistentVolumeClaim statically.
# create PV
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pv-nfs-csi.yaml

# create PVC
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pvc-nfs-csi-static.yaml