Use Alibaba Cloud storage in ACS clusters
ACS container storage uses the Kubernetes Container Storage Interface (CSI) to integrate Alibaba Cloud storage services such as block storage, File Storage NAS, and Object Storage Service (OSS). It is also compatible with native Kubernetes storage types such as EmptyDir and ConfigMap. This topic describes the Alibaba Cloud storage services supported by ACS, including their features, use cases, and how to mount them.
Storage basics
Volume
PV and PVC
Choose a cloud storage service
Alibaba Cloud provides low-cost, reliable, and highly available storage services for block, file, and object storage. You can choose a suitable cloud storage service based on your workload's compute type and storage requirements, considering factors such as data volume, data access frequency, IOPS, and throughput.
Cloud storage support for different compute types
-
For CPU-based ACS pods (including general-purpose and performance-optimized types), you can mount all types of cloud storage that ACS supports.
-
For GPU-based ACS pods (including GPU and GPU-HPN types), support is as follows:
-
You can mount File Storage NAS, CPFS General-purpose Edition, and OSS.
-
Only some GPU models support mounting block storage and CPFS for Lingjun. For more information, submit a ticket.
-
Cloud storage features and use cases
|
Cloud storage |
Features |
Use cases |
Selection guide |
|
Non-shared, low-latency, and highly reliable block-level random access storage. Similar to a physical hard drive, it supports partitioning, formatting, and creating file systems. |
|
The following types of block storage are supported:
Choose a disk type based on your billing and performance needs. For more information, see Prices of block storage devices and Block storage performance. |
|
|
A distributed file system that offers shared access, elastic scaling, high reliability, and high performance. It provides high throughput and IOPS while supporting random reads and writes and online file modifications. |
|
Supports General-purpose NAS and Extreme NAS. You can choose a suitable NAS type and storage plan based on cost and performance. For more information, see General-purpose NAS, Extreme NAS, and Selection guide. |
|
|
A fully managed, scalable parallel file system that delivers high throughput and IOPS. |
|
You can select a specification based on the cost and performance of CPFS General-purpose Edition. For more information, see Product specifications. |
|
|
Designed for intelligent computing workloads, it provides ultra-high throughput and IOPS, with support for end-to-end RDMA networking. |
|
CPFS for Lingjun is in an invitational preview and is available only in specific regions and availability zones. For more information, see CPFS for Lingjun. |
|
|
OSS provides a low-cost, massive, and shared storage space ideal for data that is written once and seldom modified. |
|
You can select a storage class based on billing methods and data access frequency. For more information, see Selection guide and Storage classes. |
Mount a cloud storage volume
Storage plugin
The Container Storage Interface (CSI) is the standard for connecting storage systems to container orchestration systems like Kubernetes. ACS provides csi-provisioner as the CSI plugin for ACS clusters, which supports volumes based on Alibaba Cloud storage resources.
To mount, unmount, create, and delete volumes, the CSI plugin requires permissions to access other Alibaba Cloud services. The plugin gains these permissions by assuming the AliyunCCCSIPluginRole RAM role, allowing it to access your resources in other cloud services. For more information, see Authorization overview.
Mounting methods
You can mount a cloud storage volume by describing the Alibaba Cloud storage resource (such as a disk or a File Storage NAS file system) with a PV, binding the PV with a PVC, and then referencing the PVC in the pod's volume definition. There are two methods for mounting cloud storage, which differ in how the PV is created:
-
Static provisioning
You create a PV from an existing storage resource (a statically provisioned volume) and then bind it directly in a PVC. This method ensures the PV is ready before the container starts and is ideal for using pre-existing storage.
-
Dynamic provisioning
You use a StorageClass to define the storage to be created, and then reference that StorageClass in a PVC. The system then automatically creates and binds a PV (a dynamically provisioned volume) based on the PVC and StorageClass configurations. This method is more flexible and automated because it does not require you to create a PV beforehand.
To mount different types of volumes, see the following topics:
Related documentation
-
In addition to persistent storage, disks can be used as ephemeral volumes to store temporary data. These volumes are created and deleted along with their pod. For more information, see Mount an ephemeral volume.
-
By default, each ACS pod is provided with 30 GiB of free temporary storage space (EphemeralStorage). If this is not enough for your needs, you can increase the temporary storage space.