This topic describes how to mount Alibaba Cloud disks as volumes in Container Service for Kubernetes (ACK) clusters.

Background information

Alibaba Cloud disks can be mounted to ACK clusters in the following types:
  • Statically provisioned volumes

    Mount a statically provisioned disk volume by using a persistent volume (PV) and a persistent volume claim (PVC).

  • Dynamically provisioned volumes

Usage notes

  • Disks cannot be shared. If you mount a disk by creating a PV and a PVC, the disk can be mounted only to one pod.
  • We recommend that you use a StatefulSet to mount a disk. To mount a disk by using a Deployment, you must set the number of replicated pods to 1. If you mount a disk to an application deployed by using a Deployment, you must set the number of replicated pods to 1. In addition, you cannot prioritize pods when you mount or unmount disks. We recommend that you do not mount a disk to an application deployed by using a Deployment.
  • Before you can use a statically provisioned disk volume, you must create the disk and obtain the disk ID. For more information, see Create a disk.
    Note The disk that you create must meet the following requirements:
    • An ultra disk must have a minimum capacity of 20 GiB.
    • A standard SSD must have a minimum capacity of 20 GiB.
    • An enhanced SSD (ESSD) must have a minimum capacity of 20 GiB.
  • You can mount disks only to the nodes that are deployed in the same zone as the disks. Therefore, when you create a disk, select the zone of the pod to which you want to mount the disk.
  • Only pay-as-you-go disks can be mounted. If you change the billing method of an Elastic Compute Service (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.
  • Some ECS instances do not support ESSDs. If this type of ECS instance is specified as a node, you cannot mount an ESSD to the node. For more information, see Elastic Block Storage FAQ.
  • If a disk is partitioned, you must re-initialize the disk before you mount it as a volume.