You can use volumes created from Alibaba Cloud disks in Kubernetes clusters.
Currently, Alibaba Cloud disks can be mounted to Kubernetes clusters as follows:
- Static volumes
You can use static volumes in the following ways:
- Directly as volumes
- Through PVs and PVCs
- Dynamic volumes
- A disk is a non-shared storage that can only be mounted to one Pod at one time.
- We recommend that you mount disks to StatefulSets. To mount disks to Deployments, you need to set the number of replicas to 1.
- To use a disk as a volume, you must create the disk and obtain its disk ID first.
Create a pay-as-you-go disk.
Note Your disk must meet the following capacity requirements:
- A basic disk must have a minimum capacity of 5 GiB.
- An ultra disk must have a minimum capacity of 20 GiB.
- An SSD disk must have a minimum capacity of 20 GiB.
- An ESSD disk must have a minimum capacity of 20 GiB.
- volumeId: The ID of the mounted disk, which must be the same as volumeName and PV Name.
- Disks can only be mounted to nodes that are located in the same zone.
- Only pay-as-you-go disks can be mounted. If you change the billing method of an ECS instance in the cluster from pay-as-you-go to subscription, you cannot change the billing method of its disks to subscription. Otherwise, the disks cannot be mounted to the cluster.