You can use OSS buckets to create PVs in Kubernetes clusters.
Currently, you can use static OSS volumes only. You can use OSS volumes in the following ways:
- Directly as volumes
- Through PVs and PVCs
You have created a bucket in the OSS console.
- OSS is a shared storage system that can provide storage services to multiple pods at the same time.
- bucket: Only buckets can be mounted to a Kubernetes cluster. The subdirectories or files in a bucket cannot be mounted to a Kubernetes cluster.
- url: The endpoint of the OSS bucket. If the OSS bucket and target node are deployed in the same region, you can use an internal endpoint.
- akId: Your AccessKey ID.
- akSecret: Your AccessKey secret.
- otherOpts: The custom parameters for mounting the OSS bucket, in the format of
-o *** -o ***.
- To use OSS buckets to create PVs, you do not need to specify a subdirectory.
- We recommend that you create a PV for each application.
- OSS is a FUSE file system that can be mounted through the OSSFS plug-in, which is suitable for reading configuration files, videos, and image files.
- OSSFS does not perform well in data write scenarios. We recommend that you use NAS if your workload mostly involves write operations.
- You can modify parameter configurations to optimize OSSFS performance in caching and permission management. For more information, see FAQ, ossfs/README-CN.md, and FAQ.
- If your Kubernetes cluster is created before February 6, 2018, you need to Install the plug-in before you use OSS volumes. To use OSS volumes, you must create a secret with your AccessKey information when you deploy the Flexvolume service.
- The OSSFS plug-in restarts when you upgrade a Kubernetes cluster or restart the kubelet. In this case, OSS volumes that are mounted through an early Flexvolume version need to be mounted again, and pods that use the OSS volumes must be recreated. You can upgrade Flexvolume to the latest version to fix this issue.