a43qadkl
as shown below:
Configuration Item | Description |
Name | Enter the StorageClass name, for example, cfs-storageclass . |
Region | It is the region of the cluster by default. |
Provisioner | Provisioner can be CBS (CSI) or Cloud File Storage. Here, Cloud File Storage is selected. |
Instance creation mode | It can be New instance or Shared instance. New instance: During mounting, a CFS instance is created for each PVC by default. Shared instance: During mounting, PVCs correspond to different sub-directories of the same CFS instance. The shared CFS instance and its sub-directories are created automatically by the system. The shared instance mode is supported by the CFS-CSI add-on on v1.0.1 or later. Upgrade your add-on in time. Use instructions are as follows: For a StorageClass in shared instance mode, the Reclaim policy is Retain. When the StorageClass is used to dynamically create a PVC for the first time, a CFS instance will be created by default, along with its sub-directories to implement isolated mounting of PVCs. CFS instances created by different StorageClasses in shared instance mode are different. We recommend you limit the number of instances. |
AZ | In the current region, select an AZ that supports CFS. Different AZs in the same region support different storage classes. For more information, see Recommended Regions. |
CFS subnet | Set the subnet range of the CFS in the current AZ. |
Storage Type | CFS provides Standard Storage and Performance Storage. Different AZs in the same region support different storage types. Select one as needed. Standard Storage: It features cost-effectiveness and large capacity, making it suitable for scenarios such as data backup, file sharing, and log storage. Performance Storage: It features high throughput and IOPS, making it suitable for IO-intensive workloads such as high-performance computing, media asset rendering, machine learning, DevOps, and OA. |
File service protocol | It is NFS by default to allow for pass-through access to files and file systems on the server. |
Protocol version | We recommend you use NFSv3 for better performance. If your application relies on file locking (that is, multiple CVM instances are needed to edit a file), use NFSv4 for mounting. |
Permission Group | Configure a permission group for the file system, which is used to manage the access and read/write permissions of clients that access the file system over the same network. Select a permission group as needed. If no such permission group is available, create one on the Permission Group page. |
Reclaim policy | It can be Delete or Retain. The latter is recommended out of data security considerations. Delete: If a PV is dynamically created through a PVC, the PV and storage instance bound to the PVC will be automatically terminated when the PVC is terminated. Retain: If a PV is dynamically created through a PVC, the PV and storage instance bound to the PVC will be retained when the PVC is terminated. |
Label | Select the cloud tag to be bound to the CFS instance. The tag will be automatically inherited by the CFS instance that is created dynamically by a StorageClass. After creation, the parameters of the bound tag cannot be modified. If the existing tags are not suitable, create one in the Tag console. |
Configuration Item | Description |
Name | Enter the PersistentVolumeClaim name, for example, cfs-pvc . |
Namespaces | A namespace is used to assign cluster resources. Here, default is selected. |
Provisioner | Select Cloud File Storage. |
Read/write permission | CFS only supports Multi-computer read and write. |
StorageClass | Specify the StorageClass as needed. Here, Specify is selected. cfs-storageclass created in the Creating a StorageClass step is used as an example. The PVC and PV will be bound to the same StorageClass. If you select Do not specify, the value of StorageClass for the corresponding PVC is null, and the value of the storageClassName field in the corresponding YAML file is a null string. |
PersistentVolume | Specify the PersistentVolume as needed. Here, Do not specify is selected. The system first searches the current cluster for PVs that meet the binding rules. If there are no such PVs, the system dynamically creates a PV to be bound based on the PVC and StorageClass parameters. Either the StorageClass or PersistVolume should be specified. For more information on Do not specify for PersistentVolume, see PV and PVC binding rules. |
cfs-vol
as an example.cfs-pvc
, which you created in the step of Creating a PVC.cfs-vol
that you added in this step./cache
as an example./data
or /test.txt
.apiVersion: storage.k8s.io/v1kind: StorageClassmetadata:name: cfsparameters:# subdir-share: "true"vpcid: vpc-xxxxxxxxsubnetid: subnet-xxxxxxxxvers: "3"resourcetags: ""provisioner: com.tencent.cloud.csi.cfsreclaimPolicy: DeletevolumeBindingMode: Immediate
Parameter | Required | Description |
zone | No | It defines the region for the CFS instance. |
pgroupid | No | It defines the permission group for the CFS instance. |
storagetype | No | It defaults to Standard Storage (SD). Valid values: SD (Standard Storage) HP (High-Performance Storage). |
subdir-share | Yes | It indicates the shared instance mode for instance creation by StorageClass. |
vpcid | Yes | It indicates the ID of the VPC where the file is stored. |
subnetid | Yes | It indicates the ID of the subnet where the file is stored. |
vers | Yes | It indicates the version of the protocol used by the add-on to connect to the file system. The dynamically created PVs inherit this parameter. The versions "3" and "4" are supported. |
resourcetags | Yes | It indicates the cloud tag of the file system. A corresponding Tencent Cloud tag is applied on the generated file system. Multiple tags are separated by comma. For example, "a:b,c:d". |
apiVersion: v1kind: PersistentVolumeClaimmetadata:name: cfsnamespace: defaultspec:accessModes:- ReadWriteManyresources:requests:storage: 10GistorageClassName: cfsvolumeMode: FilesystemvolumeName: XXX # You don't need to specify it for dynamic creation. For static creation, you need to specify the PV instance ID.
Parameter | Required | Description |
spec.accessModes | No | The cfs storage supports Multiple-Read-Multiple-Write. |
spec.resources.requests.storage | Yes | The storage capacity only depends on the type of the file system. |
Apakah halaman ini membantu?