Cloud File System (abbreviated as CloudFS) is a file storage and acceleration service designed for big data and machine learning. It supports standard Hadoop Distributed File System (HDFS) access and transparent data lake access, providing you with low-cost, high-performance, high-throughput, and highly available big data file access.
Volcengine Kubernetes Engine (VKE) supports CloudFS storage through the Container Storage Interface (CSI). This topic describes how to create CloudFS PersistentVolumes (PVs) and PersistentVolumeClaims (PVCs), and how workloads can use static CloudFS PVs.
tip
[Beta - apply for trial]: This feature is currently in the beta stage. Submit an application if you need to use it.[Beta - apply for trial] Prerequisites
Usage limits
- Currently, VKE supports only data lake access of CloudFS, not file storage access.
Creating through the console
Step 1: Create a PV
- In the left navigation pane, click Cluster. In the right part of the page, click the target cluster name to open the management page of this cluster.
- In the left navigation pane of the cluster management page, click Storage > PersistentVolume. Click Create PersistentVolume and complete the PersistentVolume configuration.
- In the left navigation bar on the cluster management page, click Storage > PersistentVolumeClaim.
- Click Create PersistentVolumeClaim to configure a PVC.
Step 3: Create an application and mount the PV
After the PV is created, add it to a workload that will use it. Supported workloads include Deployment, StatefulSet, Job, CronJob, and DaemonSet.
You can add a PV to a workload when creating it or updating it. For details, see Workloads. Creating through kubectl
If you have completed cluster connection, you can configure static CloudFS PVs via kubectl. - Create a YAML file for the PV. The following vke-cfs-static-pv.yaml file serves as an example:
- The key parameters are described in the following table.
- Run the following command to create the PV.
Step 2: Create a PVC
- Create a YAML file for the PVC. The following vke-cfs-static-pvc.yaml file serves as an example:
- The key parameters are described in the following table.
- Run the following command to create the PVC.
- Run the following command to view the result of the static association between the PVC and PV.
- If the response is similar to the following one, the binding is successful.
Step 3: Create an application and mount the PV
- Create a YAML file for the Deployment. The following deployment-nginx-static.yaml file serves as an example:
tip
csi-cloudfs provides mount-level fault recovery capabilities. If the Mount Pod fails (causing a restart or recreation), application containers can still continue operating. To achieve this, in the volumeMounts of your application Pod, set mountPropagation to HostToContainer or Bidirectional. This propagates the storage mount of the host node to the Pod, enabling mount-level fault recovery. For more information, see Volume propagation. - Run the following command to create the Deployment.
After creating a workload and mounting a PV to it as described in the preceding steps, you can verify the volume mounting status and persistent storage via the following methods.
- Run the following command to check whether the PV is mounted to the specified path in the pod.
- The expected response is as follows.
- Check the mount path in the pod to view the data in the PV.
- The expected response is as follows.
- Check the mount path of the PV in the newly created pod.
- The expected result is as follows. You can see that the file written to the PV still exists and is not deleted along with the pod. This indicates that persistent storage of data is achieved.