ACS integrates Alibaba Cloud block storage, File Storage NAS (NAS), Cloud Parallel File Storage (CPFS), and Object Storage Service (OSS) through the Kubernetes Container Storage Interface (CSI). These services work alongside native Kubernetes volume types such as EmptyDir and ConfigMap. Choose the storage type that fits your workload.
Storage basics
Volume
PV and PVC
Prerequisites
To mount, unmount, create, and delete volumes, the CSI plugin requires permissions to access resources in other Alibaba Cloud products. The plugin uses RAM role authorization to request the creation of the AliyunCCCSIPluginRole role, which grants the plugin access to your resources in other cloud products. Make sure this role is configured before you mount cloud storage.
For more information, see Authorization overview.
Choose cloud storage
Alibaba Cloud provides low-cost, highly reliable, and highly available block, file, and object storage services for container workloads.Choose a storage type based on the compute type and storage requirements of your workload, and consider factors such as data volume, data access frequency, IOPS, and throughput.
Scenario-to-storage mapping
The following list maps common workload scenarios to the recommended storage type. Use this as a starting point, then refer to the comparison table for detailed feature information.
Databases and middleware that require low-latency, non-shared block storage — Use block storage. A cloud disk delivers low latency and high performance for I/O-intensive applications. Block storage is non-shared and can be mounted to only one pod at a time.
Shared data between pods, big data analytics, web applications, and log persistence — Use NAS. NAS is a shared file system that supports concurrent access from multiple pods, high throughput, and online file modification.
AI training, autonomous driving, genetic computing, and film and television rendering — Use CPFS General-purpose Edition. This fully managed parallel file system delivers the high throughput and high IOPS required by high-performance computing (HPC) workloads.
AI-generated content (AIGC) and other intelligent computing workloads that require ultra-high throughput with Remote Direct Memory Access (RDMA) — Use CPFS for Lingjun. This parallel file system supports end-to-end RDMA networks and is purpose-built for intelligent computing. CPFS for Lingjun is in invitational preview.
Read-mostly unstructured data, high-concurrency batch processing, and data with demanding authentication and disaster recovery requirements — Use OSS. OSS provides low-cost, massive shared storage for configuration files, images, audio and video files, AI inference, and data analytics.
Cloud storage support by compute type
CPU-based ACS pods (general-purpose and performance-optimized types): All cloud storage types that ACS supports can be mounted.
GPU-based ACS pods (GPU and GPU-HPN types):
Supported by default: NAS and OSS.
Limited support: Only some GPU models support block storage and CPFS for Lingjun. For more information, [submit a ticket on the international site].
Comparison table
Cloud storage | Features | Common scenarios | Selection guide |
Non-shared, low-latency, and highly reliable block-level random access storage. Similar to a physical hard disk, it supports partitioning, formatting, and creating a file system. |
| The following types of block storage are supported:
You can choose a disk type based on your billing and performance needs. For more information, see Block Storage Pricing and Block storage performance. | |
A distributed file system that provides shared access, elastic scaling, high reliability, and high performance. It delivers high throughput and high IOPS, and supports random reads and writes and online file modification. |
| General-purpose NAS and Extreme NAS are supported. Choose a NAS type and storage specification based on factors such as NAS costs and performance. For more information, see General-purpose NAS, Extreme NAS, and Selection guide. | |
A fully managed and scalable parallel file system that delivers high throughput and high IOPS. |
| Choose a specification based on factors such as the cost and performance of CPFS General-purpose Edition. For more information, see Product specifications. | |
Designed for intelligent computing workloads, it delivers ultra-high throughput and IOPS and supports end-to-end RDMA networks. |
| CPFS for Lingjun is in invitational preview and is currently available only in some regions and zones. For more information, see CPFS for Lingjun. | |
Low-cost and massive shared storage space, which suits data that is seldom modified after it is written. |
| Choose a StorageClass based on factors such as OSS billing and data access frequency. For more information, see Selection guide and StorageClass reference. |
Mount cloud storage
CSI is the storage plugin implementation recommended by the Kubernetes community. ACS provides csi-provisioner as the CSI add-on for ACS clusters. This plugin supports volumes based on Alibaba Cloud storage resources.
To mount cloud storage, create a PV that describes an Alibaba Cloud storage resource such as a cloud disk or a NAS file system, bind the PV to a PVC, and then declare the PVC in the volume definition of a pod. Based on how the PV is created, cloud storage can be mounted in two ways:
Static provisioning: You create a PV from an existing cloud storage resource and bind it directly in a PVC. This method guarantees that the PV is ready before the container starts, and it suits scenarios where the storage resource already exists.
Dynamic provisioning: You use a StorageClass to define the cloud storage resource to create, and then associate the StorageClass in a PVC. The system automatically creates and binds a PV based on the PVC and StorageClass configurations. This method does not require you to create a PV in advance, which makes it more flexible and automated.
The following topics describe how to mount each type of volume:
Next steps
In addition to persistent storage, a cloud disk can also serve as an ephemeral volume that stores temporary data. Ephemeral volumes are created and deleted together with the pod. For the detailed procedure, see Mount an ephemeral volume.
By default, each ACS pod provides 30 GiB of free ephemeral storage. If this capacity does not meet your requirements, you can increase the ephemeral storage space as needed.