Overview
You can configure a storage class in the Add Container step of creating a workload.
Local Storage
You can mount the file directory of the host where a container is located to a specified container path (corresponding to hostPath in Kubernetes). Alternatively, you can leave the source path empty (corresponding to emptyDir in Kubernetes). If the source path is left empty, a temporary directory of the host will be mounted to the mount point of the container. A specified source path is used when data needs to be persistently stored on the host, while emptyDir is used when temporary storage is needed. A ConfigMap is a type of resource that stores configuration information required by a workload. Its content is user-defined. A secret is a type of resource that holds sensitive data, such as authentication and key information, required by a workload. Its content is user-defined. For details, see Mounting a Local Volume.
PVCs
You can create persistent volumes and mount them to a container path. When containers are migrated, the cloud storage is mounted to new containers to ensure data reliability. For details, see Mounting a PV. You are advised to select PVCs when creating a workload and store pod data on the corresponding cloud storage. If you store pod data on a local volume and a fault occurs on the node, the data cannot be restored.
- UCS can automatically create EVS, OBS, and SFS volumes and mount them to the container path of a Huawei Cloud cluster.
- EVS offers scalable block storage with high reliability, high performance, and extensive specifications for containers. EVS stores binary data and cannot store files directly. This storage class is applicable when data needs to be stored permanently.
- SFS provides high-performance file storage (NAS) that can be expanded on demand. It provides shared file access for containers and is used for persistent storage in ReadWriteMany scenarios, including media processing, content management and web services, and big data and application analysis.
- OBS provides unlimited storage capacity for objects/files in any format. It is mainly designed for scenarios involving storage and analysis of massive data, query of historical data details, analysis on a large number of behavior logs, and statistical analysis on public transactions.
- When a non-Huawei Cloud cluster uses a PVC to mount cloud storage, the cluster provider must support StorageClasses. For details, see Storage Classes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot