This section describes how to create a PersistentVolumeClaim.

Prerequisites

You need to join a project and have the PersistentVolumeClaim Management permission in the project. For more information, see Project Members and Project Roles.

Steps

  1. Log in to the KubeSphere web console with a user who has PersistentVolumeClaim Management permissions and enter your workspace.

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

  3. Select a project from the drop-down list in the upper left corner of the page.

  4. Click Create on the page.

  5. 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.

    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.

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

    • Creation Method > Create via StorageClass

      Parameter Description

      StorageClass

      The StorageClass used to create the PersistentVolumeClaim.

      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 volume capacity corresponding to the PersistentVolumeClaim.

    • Creation Method > Bind to an Existing PersistentVolume

      Parameter Description

      PersistentVolume

      Select an existing PersistentVolume to use for creating the PersistentVolumeClaim.

  7. 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.