Creating PVCs
Create a PersistentVolumeClaim (PVC) and set the parameters for the requested PersistentVolume (PV) as needed.
You can create a PersistentVolumeClaim either through a visual UI form or by using a custom YAML orchestration file.
TOC
Prerequisites
Ensure that there is enough remaining storage quota in the namespace to satisfy the required storage size for this creation operation.
Example PersistentVolumeClaim:
Creating a Persistent Volume Claim by using the web console
-
Go to Container Platform.
-
Click on Storage > PersistentVolumeClaims (PVC) in the left sidebar.
-
Click on Create PVC.
-
Configure the parameters as required.
Note: The following content is provided as an example using the form method; you can also switch to YAML mode to complete the operation.
-
Click on Create. Wait for the PersistentVolumeClaim to change to
Boundstatus, indicating that the PersistentVolume has been successfully matched.
Creating a Persistent Volume Claim by using the CLI
Operations
-
Bind PersistentVolumeClaim: When creating applications or workloads that require persistent data storage, bind the PersistentVolumeClaim to request a compliant PersistentVolume.
-
Create a PersistentVolumeClaim using Volume Snapshots: This helps to back up application data and restore it as needed, ensuring the reliability of business application data. Please refer to Using Volume Snapshots.
-
Delete PersistentVolumeClaim: You can click the Actions button in the top right corner of the details page to delete the PersistentVolumeClaim as needed. Before deleting, please ensure that the PersistentVolumeClaim is not bound to any applications or workloads and that it does not contain any volume snapshots. After deleting the PersistentVolumeClaim, the platform will process the PersistentVolume according to the reclamation policy, which may clear data in the PersistentVolume and free storage resources. Please proceed with caution based on data security considerations.
Expanding PersistentVolumeClaim Storage Capacity by using the web console
-
In the left navigation bar, click Storage > Persistent Volume Claims (PVC).
-
Find the persistent volume claim and click ⋮ > Expand.
-
Fill in the new capacity.
-
Click Expand. The expansion process may take some time, please be patient.
Expanding Persistent Volume Claim Storage Capacity by using the CLI
When PVC expansion fails in Kubernetes, administrators can manually recover the Persistent Volume Claim (PVC) state and cancel the expansion request. See Recover From PVC Expansion Failure