Home / Platform management / Storage / StorageClasses / Create a StorageClass: NFS CSI storage

Create a StorageClass: NFS CSI storage

Based on the community NFS CSI (Container Storage Interface) storage access plugin, it provides the ability to access multiple NFS storage systems or accounts.

Different from the traditional NFS client-server mode, NFS shared storage uses the NFS CSI (Container Storage Interface) storage plugin, which is more in line with the design concept of Kubernetes and can provide client access capability for multiple servers.

Prerequisites

Deploy the NFS shared storage plugin

  1. Click Storage > StorageClass on the left navigation bar.

  2. Click Create StorageClass.

  3. Click Deploy on the right of NFS CSI to go to the Plugins page.

  4. Click > Deployments on the right of the NFS plugin.

  5. Wait for the deployment status to be Deployment success to complete the deployment.

Create nfs shared storage storage class

  1. Click Create StorageClass.

    Note: The following content is an example in the form of a form. You can also choose > Create in YAML to complete the operation.

  2. Select NFS CSI and click Next.

  3. Configure the relevant parameters according to the following instructions.

    Parameter Description
    Name The name of the storage class. It must be unique within the current cluster.
    Server Address The access address of the NFS server. For example: 192.168.2.11.
    Path The mount path of the NFS file system on the server node. For example: /nfs/data.
    NFS Protocol Version Currently supports three versions: v3, v4.0, and v4.1.
    Recycle Strategy The recycling strategy for persistent volumes.
    - Delete: When the persistent volume claim is deleted, the bound persistent volume will also be deleted.
    - Retain: Even if the persistent volume claim is deleted, the bound persistent volume will still be retained.
    Access mode All access modes supported by the current storage. When declaring a persistent volume later, only one of these modes can be selected to mount the persistent volume.
    - Single node read-write (RWO): Can be mounted by one node in read-write mode.
    - Multi-node read-write (RWX): Can be mounted by multiple nodes in read-write mode.
    - Multi-node read-only (ROX): Can be mounted by multiple nodes in read-only mode.
    Allocate Project Please allocate the project that can use this type of storage.
    If there are no projects that need to use this type of storage temporarily, you can also not allocate projects first and update them later.
  4. After confirming that the configuration information is correct, click Create.