Last updated：2021-05-11 10:41:17
Data is not persistently stored in a container by default. When a container is deleted, data stored in the container is cleared. To address this problem, Docker provides the volume mechanism for persistent data storage. Similarly, Kubernetes provides a more powerful volume mechanism and various plug-ins to enable persistent storage of container data and data sharing between containers. KCE adopts the concept of volumes in Kubernetes, and supports various types of volumes. Additionally, pods can use an unlimited number of volumes.
KCE is developed and adapted based on Kubernetes, allowing you to set the following types of volumes:
Local disk volumes: You can mount the file directory of the host where a container resides to a specified path in the container, which corresponds to hostPath of Kubernetes. You can also leave the source path empty, which corresponds to emptyDir of Kubernetes. If the source path is not specified, a temporary directory of the host is mounted to the mount point of the container. Local disk volumes with a specified source path are suitable for persistent storage of data on a host where a container resides. emptyDir is suitable for temporary storage of container data.
EBS volumes: KCE allows you to use EBS as volumes for Kubernetes clusters. You can mount an EBS volume to a specific path of a container to achieve persistent data storage. If the container is migrated, the EBS volume is migrated with the container. EBS supports only the ReadWriteOnce access mode. Therefore, when you configure an EBS volume, the maximum number of pods is 1.
Kingsoft Cloud File Storage (KFS) volumes: KFS provides scalable shared file storage services for Kubernetes clusters. KFS also provides standard file access protocols, allowing file systems to be mounted to existing applications without any modification. KFS is suitable for many scenarios including content management, enterprise file sharing, and media processing.
Kingsoft Cloud Performance File Storage (KPFS) volumes: KPFS is a high-performance file storage service of Kingsoft Cloud. KPFS provides a globally unified namespace, allowing a large number of computing nodes to simultaneously access the shared file system. KPFS provides a throughput up to hundreds of gigabytes per second with its scale-out capability. With a dedicated network, KPFS can control data read/write latency within milliseconds, providing scalable, high-performance shared file storage services for Kubernetes clusters.
Did you find the above information helpful?
Please give us your feedback.
Thank you for your feedback.