Disks are non-shared, low-latency, and high-reliability block-level random storage. Disks are suitable for applications that require high IOPS and low latency but do not require data sharing, such as databases. Container Service for Kubernetes (ACK) allows you to mount Enterprise SSDs (ESSDs) and ESSD AutoPL disks to pods as volumes to meet the requirements for data persistence.
Disk categories
Disks are suitable for the following scenarios:
You want to create applications that require high disk I/O throughput and do not require data sharing. The applications can use storage services such as MySQL and Redis.
You want to write logs at high speeds.
You want to persist data in a way that is independent of the pod lifecycle.
ACK supports ESSDs, ESSD AutoPL disks, ESSD Entry disks, and disks of the previous generation, such as standard SSDs, ultra disks, and basic disks. The features, performance, and price of a disk varies based on its category. When you mount a disk volume, we recommend that you select a suitable disk category based on your business requirements and scenarios.
Note
Standard SSDs, ultra disks, and basic disks are cloud disks of the previous generation and are unavailable for purchase in specific regions and zones. We recommend that you use ESSDs at performance level 0 (PL0 ESSDs) or ESSD Entry disks instead of ultra disks and basic disks and use ESSD AutoPL disks instead of standard SSDs.
Features and scenarios of disk categories
The following table describes the features and scenarios of different disk categories. For more information, see Overview of Block Storage.
Disk category | Feature | Scenario |
Disk category | Feature | Scenario |
ESSD AutoPL disks | Decouple disk capacity from disk performance. Support the performance provision feature. Support the performance burst feature.
| All scenarios for which ESSDs are suitable. Scenarios in which disk performance needs to be increased without the need for disk capacity extension. Scenarios in which business workloads significantly fluctuate and disks need to burst their performance when workload spikes occur.
|
ESSDs | Deliver high IOPS. Deliver low latency.
| Latency-sensitive applications or I/O-intensive business scenarios, such as: |
ESSD Entry disks | Deliver high IOPS. Deliver low latency.
| |
Disk performance
The performance of a disk varies based on its category. The performance metrics of disks include IOPS, throughput, and latency.
For more information about the performance metrics of disks, see Performance metrics.
For more information about the performance data of different disk categories, see Performance of cloud disks.
The final performance of cloud disks is subject to the disk specification limits and Elastic Compute Service (ECS) instance type limits. For more information, see Storage I/O performance.
Billing of cloud disks
Cloud disks support the pay-as-you-go and subscription billing methods. However, only pay-as-you-go disks can be mounted. You can purchase storage capacity units (SCUs) to reduce the disk cost.
Limits
Disks cannot be shared. If multi-attach is not enabled for disks, each disk can be mounted to only one pod. For information about the multi-attach feature, see Use the multi-attach and NVMe reservation features of NVMe disks.
You can mount a disk only to a pod that resides in the same zone as the disk.
The ECS instance types to which a cloud disk can be attached depend on the category of the disk.
When you mount a disk volume to a pod, make sure that the instance type of the ECS instance on which the pod runs supports the category of the disk that you want to mount. For more information about the matching rules between disk categories and ECS instance types, see Overview of instance families.
Disk operations
Operation | Description | References |
Operation | Description | References |
Mount disk volumes | Statically provisioned disk volumes Create a persistent volume (PV) based on an existing cloud disk and mount the PV to a persistent volume claim (PVC). Then, mount the PVC to your application. Static provisioning ensures that the PV is ready before the container is started, which is suitable for scenarios where you want to use existing cloud disks. Dynamically provisioned disk volumes Use a StorageClass to define the cloud configurations and associate the StorageClass with a PVC. Then, mount the PVC to your application. The system automatically creates a disk and a PV, and binds the disk to the PV based on the configurations of the PVC and StorageClass. Dynamic provisioning provides a flexible and automated method for disk mounting. You do not need to create PVs in advance.
| |
Expand disk volumes | As your business and application data grow, the storage space of your disk volumes may become insufficient. In this case, you can expand your disk volumes to meet the increasing storage requirements. | Expand disk volumes |
Change the category of a cloud disk. | If the disk volume you use does not meet your requirements for performance and storage, you can change the category of the mounted disk. Assume that you have mounted a standard SSD for your application. If your application requires a higher IOPS, you can change the category of the disk from standard SSD to ESSD. | Change the category of a cloud disk |
Use snapshots to back up data on disks | For a single disk ACK integrates the backup and restoration mechanism of cloud disks (snapshots) with volumes in ACK clusters, and provides the VolumeSnapshot resource to allow you to back up disk volume based on volume snapshots. You can restore data from a volume snapshot by setting the dataSource parameter of the PVC mounted to your application. For multiple disks If multiple disks are mounted to your cluster, you can use the VolumeSnapshot resource to create a volume snapshot from each disk. However, the snapshots may not be created at the same time, which may cause data inconsistency among the snapshots. In this case, you can create group snapshots from the disks to manage and back up data on the disks in a unified manner. This helps you reduce the risks of data inconsistency caused by asynchronous volume creation.
| |
Encrypt data on disks | After you enable the disk encryption feature, the system automatically encrypts data transmitted to a disk and decrypts the data when it is read. Disk encryption is suitable for scenarios that require high security or have compliance requirements. You can protect the privacy and autonomy of your data without the need to create and maintain a key management infrastructure. | |
Use instant access (IA) snapshots to restore data | If data loss occurs due to an accidental ESSD deletion, you can use the IA snapshot of the ESSD to restore the data in the ESSD. | Best practices for data security of disk volumes |
References
You can use the Container Storage Interface (CSI) plug-in to create, mount, and unmount volumes. For more information, see Manage the CSI plug-in
If you want to share storage across pods or zones, we recommend that you use File Storage NAS (NAS) volumes.
If errors occur when you use disk volumes, refer to FAQ about disk volumes.