Create a persistent volume claim (PVC)
This topic describes how to create a persistent volume claim (PVC) using a YAML file.
In the current Agile Platform as a Service (PaaS) base environment, AKS is not integrated with Alibaba Cloud NAS or cloud disk storage. To use storage features, you must install a third-party storage plugin.
Prerequisite
You have created a storage class.
Procedure
Log on to the Containerized Application Service console. In the navigation pane on the left, click Storage > Persistent Volume Claim (PVC).
On the Persistent Volume Claim page, click Create Persistent Volume Claim.
In the text box, enter the content in YAML format and click Submit.
Sample:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: test-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 25Gi storageClassName: csi-disk-efficiency # The name of the corresponding storage class
The minimum storage space is 20 Gi for a StorageClass whose disk type is `cloud_efficiency` or `cloud_ssd`. If you specify a size smaller than 20 Gi in the PVC, the persistent volume (PV) cannot be created, and the PVC remains in the `Pending` state.
After the PVC is created, you can view its status in the `status` section of its YAML definition. If the PVC is created successfully, the corresponding persistent volume (PV) is displayed on the Persistent Volume page.