This topic describes how to create a persistent volume claim (PVC) in the Container Service for Kubernetes (ACK) console.
Prerequisites
An ACK cluster is created. For more information, see Create an ACK managed cluster.
A persistent volume (PV) is created. In this example, the PV is created from a disk. For more information, see Disk volume overview.
By default, a PVC is associated with a PV that has the alicloud-pvname label. This label is added to all PVs that are created in the ACK console. If a PV does not have this label, you must manually add the label to the PV before you can associate the PV with a PVC.
Procedure
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose
.In the upper-left corner of the Persistent Volume Claims page, click Create.
In the Create PVC dialog box, set the parameters and click Create.
PVC Type: The PVC and PV must be of the same type. You can select Cloud Disk, NAS, and OSS.
Name: Enter a name for the PVC.
Allocation Mode: Use StorageClass, Existing Volumes, and Create Volume are supported. In this example, Use StorageClass or Existing Volumes is selected.
Existing Storage Class: Click Select. In the Select Storage Class dialog box, find the StorageClass that you want to use and click Select in the Actions column.
NoteThis parameter is required only when you set Allocation Mode to Use StorageClass.
Existing Volumes: Click Select PV. In the Select PV dialog box, find the PV that you want to use and click Select in the Actions column.
NoteThis parameter is required only when you set Allocation Mode to Existing Volumes.
Capacity: the capacity claimed by the PVC. The value cannot be larger than the total capacity of the associated PV.
Access Mode: Default value: ReadWriteOnce.
NoteThis parameter is required only when you set Allocation Mode to Use StorageClass.
NoteIf your cluster has a PV that is not used, but you cannot find it in the Select PV dialog box, the reason may be that the PV does not have the alicloud-pvname label.
If no PV is available, choose alicloud-pvname and the value to the PV name. By default, the disk ID is used as the PV name if the PV is created from a disk.
in the left-side navigation pane, find the PV that you want to use, and then click Manage Labels in the Actions column to add a label to the PV. Set the label name to