This section describes how to create a NAS-type PersistentVolumeClaim. After the PersistentVolumeClaim is created, the backend storage system will automatically create a corresponding PersistentVolume and bind it.

For other methods of creating a PersistentVolumeClaim, please refer to Create a PersistentVolumeClaim.

Prerequisites

You need to join a cluster or project and have the PersistentVolumeClaim Management permission in the cluster or project. For more information, please refer to Cluster Roles and Project Roles.

Steps

  1. Log in to the KubeSphere web console as a user with PersistentVolumeClaim Management permissions and enter your cluster or workspace.

  2. Click Storage > PersistentVolumeClaims in the left navigation pane.

  3. Click Create on the page.

  4. On the Basic Information tab, set the basic information for the PersistentVolumeClaim, then click Next.

    Parameter Description

    Name

    The name of the PersistentVolumeClaim. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and is up to 253 characters long.

    Project

    The project to which the PersistentVolumeClaim belongs.

    Alias

    An alias for the PersistentVolumeClaim. Different PersistentVolumeClaims can have the same alias.

    Description

    Descriptive information for the PersistentVolumeClaim. The description can contain any characters and is up to 256 characters long.

  5. On the Storage Settings tab, set the storage requirements, then click Next.

    • Creation Method > Bind to an Existing NAS Volume

      Parameter Description

      NFS Server Hostname / IP Address

      The hostname or IP address of the NFS server.

      NFS Volume Path

      The path of the shared directory exposed on the NFS server, e.g., /mnt/data or /share/volume.

      Access Mode

      Read and Write Modes for Persistent Volumes.

      • RWO (ReadWriteOnce): Allows a single node to read data from and write data to the persistent volume.

      • ROX (ReadOnlyMany): Allows multiple nodes to read data from the persistent volume.

      • RWX (ReadWriteMany): Allows multiple nodes to read data from and write data to the persistent volume.

      Depending on the backend storage system, some access mode types may not be available.

      Reclaim Policy

      The policy applied to the PersistentVolume when the PersistentVolumeClaim is deleted. Default is Delete.

      • Delete: After the PersistentVolumeClaim is deleted, the system automatically deletes the PersistentVolume.

      • Retain: After the PersistentVolumeClaim is deleted, the system does not automatically delete the PersistentVolume.

      Read Only

      Whether the PersistentVolumeClaim is mounted in read-only mode.

      Mount Options

      Defines parameters for NFS mounting to optimize performance or control behavior, such as hard, nfsvers=4.

      Volume Capacity

      The volume capacity corresponding to the PersistentVolumeClaim.

      For more information on the parameters, please refer to the Kubernetes Official Documentation.

    Note

    After the PersistentVolume corresponding to the PersistentVolumeClaim is created, you will not be able to modify the NFS server hostname/IP address, NFS volume path, and volume capacity. To modify them, please delete and recreate the PersistentVolumeClaim.

  6. On the Advanced Settings tab, set the labels and annotations for the PersistentVolumeClaim, then click Create.

    • Click Add to set multiple labels or annotations.

    • Click trash-light on the right side of a created label or annotation to delete it.

    Once created, the PersistentVolumeClaim will appear in the PersistentVolumeClaim list.