The container storage feature of Alibaba Cloud Container Service (ACS) is based on the Kubernetes Container Storage Interface (CSI). It integrates Alibaba Cloud storage services, such as block storage, File Storage NAS, and Object Storage Service (OSS). It is also compatible with native Kubernetes storage, such as EmptyDir and ConfigMap. This topic describes the Alibaba Cloud storage services that ACS supports, their features, common scenarios, and mount methods.
Storage basics
Volume
PV and PVC
Select a cloud storage service
Alibaba Cloud provides low-cost, highly reliable, and highly available storage services for various storage resources, including block, file, and object storage. You can select a suitable cloud storage service based on the computing power type and storage requirements of your business workload. Consider factors such as data volume, data access frequency, input/output operations per second (IOPS), and throughput.
Cloud storage support for different computing power types
For CPU-based ACS pods, including general-purpose and compute-optimized instances, you can mount all types of cloud storage that ACS currently supports.
For GPU-based ACS pods, including GPU and GPU-HPN types, the support is as follows:
You can mount NAS and OSS.
Only some GPU models support mounting block storage and CPFS for Lingjun. For more information, submit a ticket.
Features and common scenarios of different cloud storage services
Cloud storage | Features | Common scenarios | Selection guide |
Non-shared, low-latency, and highly reliable block-level random access storage. It is similar to a physical hard disk and supports partitioning, formatting, and file system creation. |
| The following types of block storage are supported:
You can select disk categories based on your requirements for billing and performance. For more information, see Prices of block storage devices and Block storage performance. | |
A distributed file system that provides shared access, scalability, high reliability, and high performance. It offers high throughput and IOPS, and supports random read and write operations and online file modification. |
| General-purpose NAS and Extreme NAS file systems are supported. You can select a suitable NAS type and storage specification based on cost and performance. For more information, see General-purpose NAS, Extreme NAS, and Selection guide. | |
Designed for intelligent computing services. It provides ultra-high throughput and IOPS, and supports end-to-end RDMA networks. |
| CPFS for Lingjun is in invitational preview and is supported only in specific regions and zones. For more information, see CPFS for Lingjun. | |
A low-cost, massive, and shared storage space. It is suitable for storing data that is rarely modified after being written. |
| You can select a suitable storage class based on OSS billing, data access frequency, and other factors. For more information, see Selection guide and Storage classes. |
Mount a cloud storage service
Storage plug-in
CSI is the storage plug-in implementation recommended by the Kubernetes community. ACS provides csi-provisioner as the CSI plug-in for ACS clusters. It supports volumes that are based on Alibaba Cloud storage resources.
For operations such as mounting, unmounting, creating, and deleting volumes, the CSI plug-in requires permissions to access resources of other Alibaba Cloud products. The CSI plug-in uses a RAM role to request the creation of the AliyunCCCSIPluginRole role to access your resources in other cloud products. For more information, see Authorization overview.
Mount methods
You can mount a cloud storage service by describing an Alibaba Cloud storage resource, such as a disk or a NAS file system, with a PV, binding the PV with a PVC, and then declaring the PVC to be used in the pod's volume. Based on the differences in how PVs are created for cloud storage resources, mount methods can be divided into the following two types:
Static
Create a PV (a statically provisioned volume) based on an existing cloud storage resource. Then, directly bind the PV in a PVC to statically mount the resource. This method ensures that the PV is ready before the container starts and is suitable for scenarios where storage resources already exist.
Dynamic
Define the cloud storage resource to be dynamically created using a StorageClass. Then, associate the StorageClass in a PVC. The system automatically creates and binds a PV (a dynamically provisioned volume) based on the configurations of the PVC and StorageClass. This method lets you dynamically mount the resource and is more flexible and automated because you do not need to create a PV in advance.
For information about how to mount different types of volumes, see the following topics:
References
In addition to persistent storage, disks can also be used as temporary volumes to store temporary data. These volumes are created and deleted along with their pods. For more information, see Mount a temporary volume.
By default, an ACS pod provides 30 GiB of free temporary storage space (EphemeralStorage). If this storage space is not enough for your needs, you can increase the size of the temporary storage space as needed.