Persistent Volumes (PVs) are the core carriers of cluster storage resources. In addition to being dynamically created through Persistent Volume Claims, they can also be created manually.

Prerequisites

You need to join a cluster and have the Persistent Volume Claim Management permission in the cluster. For more information, see Cluster Members and Cluster Roles.

Steps

  1. Log in to the KubeSphere web console with a user who has Persistent Volume Claim Management permissions and enter your cluster.

  2. Click Storage > Persistent Volume Claims in the left navigation pane.

  3. On the Persistent Volume Claims page, click Persistent Volumes to open the persistent volume list.

  4. Click Create on the page.

  5. On the Basic Information tab, set the basic information for the persistent volume, then click Next.

    Parameter Description

    Name

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

    Alias

    The alias of the persistent volume. Different persistent volumes can have the same alias.

    Description

    The description of the persistent volume. The description can contain any characters and can be up to 256 characters long.

  6. On the Advanced Settings tab, set the storage requirements, then click Create.

    • General Parameters

      Parameter Description

      Storage Class

      The storage class used to create the persistent 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.

      Volume Capacity

      The capacity size of the persistent volume.

      Volume Mode

      The device type of the persistent volume.

      • Filesystem: The persistent volume is mounted to the container as a filesystem for the container to use.

      • Block Device: The persistent volume is provided to the container as a block device.

      Reclaim Policy

      Reclaim policy of the persistent volume. The KubeSphere platform uses the Delete reclaim policy by default, which means the persistent volume is deleted when the persistent volume claim is deleted. For more information, refer to the Kubernetes official documentation.

    • Volume Type > CSI

      Parameter Description

      Driver

      A string value specifying the name of the volume driver to use.

      Volume Handle

      The unique identifier of the persistent volume in the backend storage system.

      Filesystem Type

      If the volume mode of the persistent volume is Filesystem, this field specifies the filesystem that should be used when mounting the volume.

      Read Only

      Whether to set the volume as read-only.

      Volume Attributes

      A key-value pair used to set static properties of the volume.

      For more information about the parameters, please refer to the Kubernetes official documentation.

    • Volume Type > HostPath

      Parameter Description

      Host Path

      The path of the file or folder on the node that needs to be mounted.

      Path Type

      For more information about the parameters, please refer to the Kubernetes official documentation.

    • Volume Type > NFS

      Parameter Description

      Path

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

      Server IP Address

      The IP address of the NFS server.

      Read Only

      Whether the persistent volume is mounted in read-only mode.

    After creation, the persistent volume will appear in the persistent volume list.