The storage capability of Alibaba Cloud Container Compute Service (ACS) clusters is developed based on the Kubernetes Container Storage Interface (CSI) plug-in. This capability is integrated with disks, File Storage NAS (NAS) and Object Storage Service (OSS), and is compatible with Kubernetes-native EmptyDir volumes and ConfigMaps. This topic describes the Alibaba Cloud storage services supported by ACS, including their features, application scenarios, and mounting methods.
Storage basics
Volume
PV and PVC
Select Alibaba Cloud storage services
Alibaba Cloud provides low-cost, high-reliability, and high-availability storage services based on various storage resources, such as blocks, files, and objects. You can select suitable cloud storage services based on the storage requirements of your business load and factors such as data volume, data access frequency, IOPS, and throughput.
Alibaba Cloud storage service | Feature | Scenario | Reference |
Disks are non-shared, low-latency, and high-reliability random block storage. Disks are similar to physical disks, which support partition formatting and the creation of file systems. |
| The following types of disks 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. | |
NAS is a distributed file system that provides multiple benefits. These benefits include parallel shared access, auto scaling, high availability, and high reliability. NAS provides high throughput and high IOPS, and supports random read/write operations and online file modifications. |
| General-purpose and Extreme NAS file systems are supported. You can select a appropriate NAS type and the storage specification based on the cost and performance of NAS. For more information, see General-purpose NAS file systems, Extreme NAS file systems, and Select file systems. | |
Cloud Parallel File Storage (CPFS) for Lingjun provides high throughput and IOPS for intelligent computing scenarios and supports end-to-end Remote Direct Memory Access (RDMA) networks. |
| Only CPFS for Lingjun is supported. CPFS is in invitational preview and is supported only in specific regions and zones. For more information, see What is CPFS for Lingjun (invitational preview)? | |
OSS provides a huge, low-cost, and shared storage space. If you do not need to frequently modify written data, we recommend that you store the data in OSS volumes. |
| You can select a storage class based on the billing method and data access frequency. For more information, see Instructions on storage solution selection and Overview. |
Use Alibaba Cloud storage services
Volume plug-in
Container Storage Interface (CSI) is a recommended storage plug-in in the Kubernetes community. ACS provides managed-csiprovisioner as the CSI plug-in for ACS clusters, which supports storage volumes based on Alibaba Cloud storage resources.
Before you can use the CSI plug-in to mount, unmount, create, and delete volumes, you must authorize the CSI plug-in to access other Alibaba Cloud services. CSI assumes the AliyunCCCSIPluginRole Resource Access Management (RAM) role to access resources in other Alibaba Cloud services. For more information, see Authorization overview.
Mount method
Use a PV to define Alibaba Cloud storage resources, such as cloud disks and NAS file systems. Bind a PVC to the PV, and specify that the PVC is used in the volume of the pod to mount storage resources. Based on the differences in the creation methods of cloud storage resources and PVs, the methods used to mount cloud storage resources can be divided into the following types:
Statically provisioned volume
Create a PV based on the existing cloud storage resources and bind the PV to the PVC to implement static mounting. This method ensures that the PV is ready before the container is started, which is suitable for scenarios that involve existing storage resources.
Dynamically provisioned volume
You can use a StorageClass to define the cloud storage resources that you want to dynamically create and associate the StorageClass with a PVC. The system automatically creates and binds a PV based on the configurations of the PVC and StorageClass. This mode is more flexible and automated, without the need to create PVs in advance.
The following table describes how to mount different types of volumes.
Alibaba Cloud storage service | Statically provisioned volume | Dynamically provisioned volume |
Disks | Not supported | Verify that a dynamically provisioned disk volume can be used to persist data |
NAS | ||
CPFS for LINGJUN | Not supported | |
OSS | Not supported |
In addition to persistent storage, disks can be used as temporary storage volumes to hold ephemeral data. Such storage volumes are created and deleted together with pods. For more information, see Mount ephemeral volumes.