You can mount local storage volumes to pods in clusters of Container Service for Kubernetes (ACK). You can also provision local storage volumes as persistent volumes (PVs) and use the CSI plug-in to mount the PVs to pods by using persistent volume claims (PVCs).
Introduction
The storage medium of local volumes can be local disks of Elastic Compute Service (ECS) instances, cloud disks provided by Alibaba Cloud, or memory. For more information, see Local disks and Disks.
Local disks are located on the physical machines that host their associated ECS instances. Local disks provide local storage for ECS instances. Local disks are cost-effective and offer high random IOPS, high throughput, and low latency.
hostPath: provided by Kubernetes. A hostPath volume mounts a file or directory from the file system of the host node to a pod. hostPath volumes can automatically create a directory if no directory exists in the mount path. Pods that are mounted with hostPath volumes can be scheduled to other nodes.
local: provided by Kubernetes. A local volume mounts a local storage device to a pod, such as a disk, partition, or directory. Pods that are mounted with local volumes are scheduled based on scheduling policies configured in the corresponding PV.
LV: Logical Volume Manager (LVM) virtualizes local disks by creating volume groups (VGs) and logical volumes (LVs). You can mount LVs to pods.
Alibaba Cloud uses LVM to support the automatic creation, deletion, and isolation of LVs. Alibaba Cloud also allows you to automate the operations and maintenance (O&M) of VGs, configure the IOPS of LVs, and size the storage capacity of LVs.
Memory: memory resources can be virtualized as a tmpfs (RAM-backed filesystem). You can mount a memory volume to provide fast local storage.
Storage specifications
Alibaba Cloud provides the following types of local disks: NVMe SSD and SATA HDD. For more information, see Local disks and Local disks.
Scenarios
Local storage is suited for scenarios that require high storage I/O performance, mass storage, and high cost-efficiency.
The following table describes the operations that you can perform on a local storage volume to meet your business requirements.
Operation | References |
Store application data |
|
Limits
The following types of volumes are supported: hostPath, local, LV, and memory.
Local storage volumes do not provide high availability and are applicable to only scenarios where temporary storage is required or where applications can provide high availability.
LVs cannot be migrated. Therefore, LVs are not suitable for high availability scenarios.
Billing
Fees for local disks are included in the fees for the instances to which the disks are attached. For more information, see Subscription and Pay-as-you-go.