All Products
Search
Document Center

Container Service for Kubernetes:Use a dynamic cloud disk volume in the console

Last Updated:Jun 20, 2026

This topic describes how to dynamically create and use a cloud disk volume for a stateful application on the Container Service for Kubernetes (ACK) console. It covers how to create a StorageClass, request storage with a Persistent Volume Claim (PVC), and mount the volume to a workload.

Prerequisites

You have an ACK cluster. For more information, see Create an ACK managed cluster.

Step 1: Create a StorageClass

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Volumes > StorageClasses.

  3. On the StorageClasses page, click Create. In the Create dialog box, set the following parameters.

    • Name: The name of the StorageClass.

    • PV Type: Select Cloud Disk for this example.

    • Volume Plug-in: Select Flexvolume for this example.

    • Parameter: In this example, the parameters include type and zoneid.

      • type: Specifies the type of cloud disk. Valid values are cloud_efficiency (ultra disk), cloud_ssd (standard SSD), and cloud_essd (enhanced SSD). If you set this parameter to available, the system attempts to create an enhanced SSD (ESSD), a standard SSD, and an ultra disk in sequence until a cloud disk is successfully created.

      • zoneid: The zone where the cloud disk will be created.

        zoneid: cn-hangzhou-a,cn-hangzhou-b,cn-hangzhou-c
      • encrypted: Optional. Specifies whether to encrypt the cloud disk. By default, the disk is not encrypted (false).

    • Reclaim Policy: Specifies the reclaim policy for the cloud disk. The default value is Delete. Retain is also supported. We recommend using Retain for mission-critical data to prevent accidental data loss.

    • Binding Mode: The default value is Immediate. WaitForFirstConsumer is also supported.

    • Mount Options: Specifies additional options for mounting the volume.

  4. After you configure the parameters, click Create.

Step 2: Create a PVC

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Volumes > Persistent Volume Claims.

  3. On the Persistent Volume Claims page, click Create. In the Create PVC dialog box, set the following parameters.

    • PVC Type: Supported types are Cloud Disk, NAS, and OSS. For this example, select Cloud Disk.

    • Name: The name of the PVC. The name must be unique within the cluster.

    • Allocation Mode: Supported modes are Use StorageClass, Existing Volumes, and Create PV. For this example, select Use StorageClass.

    • Existing Storage Class: Click Select Storage Class. In the Select Storage Class dialog box, click Select Node in the Actions column of the target StorageClass.

    • Capacity: The capacity of the volume.

      Note

      The requested capacity must be within the limits of the selected cloud disk type.

    • Access Mode: The default value is ReadWriteOnce.

  4. Click Create.

    After the PVC is created, it appears in the list and is bound to a corresponding volume.

Step 3: Create a workload and mount the volume

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Workloads > StatefulSets.

  3. On the StatefulSets page, click Create from Image.

  4. Configure the StatefulSet.

    This section focuses on volume configuration. For information about other parameters, see Create a StatefulSet.

    You can add local storage, add a PersistentVolumeClaim, or add a PVC template.

    In this example, a cloud disk volume is configured and mounted to the /tmp directory in the container. Data written to this directory is stored on the cloud disk. In the Volumes section, click Add PersistentVolumeClaim. Set PV Type to Cloud Storage, select the PVC you created for Mount Source, set Mount Path to /tmp, and leave Sub-path empty.

  5. After you configure all the parameters, click Create.

    After the workload is created, the volume is mounted and ready for use.

You can also use the CLI to dynamically provision a cloud disk volume. For more information, see Use a dynamically provisioned cloud disk volume by using the CLI.