Deep Learning Containers (DLC) allows you to store source data in Object Storage Service (OSS). This topic describes how to mount an OSS bucket to a Container Service for Kubernetes (ACK) cluster.

Prerequisites

An OSS bucket is created. For more information, see Create buckets.
Note If a node and an OSS bucket are located in the same region, you can use the internal endpoint of the OSS bucket when you mount the bucket to the node.

Create a PV

  1. Log on to the ACK console.
  2. In the left-side navigation pane, click Clusters.
  3. On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.
  4. In the left-side navigation pane of the details page, choose Volumes > Persistent Volumes.
  5. Click the Persistent Volumes tab. On the Persistent Volumes tab, click Create in the upper-right corner.
  6. In the Create PV dialog box, configure the parameters.
    Parameter Description
    PV Type You can select Cloud Disk, NAS, or OSS. In this example, select OSS.
    Volume Name The name of the persistent volume (PV). The name must be unique in the namespace. In this example, enter pv-oss.
    Volume Plug-in You can select Flexvolume or CSI. In this example, select CSI.
    Capacity The capacity of the PV.
    Access Mode Default value: ReadWriteMany.
    AccessKey ID The AccessKey pair that is required to access the OSS bucket.
    AccessKey Secret
    Optional Parameters Configure custom parameters for the OSS bucket in the format of -o *** -o ***.
    Bucket ID The name of the OSS bucket that you want to use. Click Select Bucket. In the dialog box that appears, select the OSS bucket that you want to use and click Select.
    Endpoint Select the endpoint of the OSS bucket.
    • If the OSS bucket and the ECS instance are located in different regions, select Public Endpoint.
    • If the OSS bucket and the ECS instance are located in the same region, set the value based on the network type of the cluster.
      • If the cluster uses a virtual private cloud (VPC), select VPC Endpoint.
      • If the cluster uses the classic network, select Internal Endpoint.
    Label Attach labels to the PV.
  7. Click Create.

Create a PVC

  1. Log on to the ACK console.
  2. In the left-side navigation pane, click Clusters.
  3. On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.
  4. In the left-side navigation pane of the details page, choose Volumes > Persistent Volumes.
  5. On the Persistent Volume Claims tab, click Create in the upper-right corner.
  6. In the Create PVC dialog box, configure the parameters.
    Parameter Description
    PVC Type You can select Cloud Disk, NAS, or OSS. In this example, select OSS.
    Name The name of the persistent volume claim (PVC). The name must be unique in the namespace.
    Allocation Mode In this example, select Existing Volumes.
    Note If no PV is created, you can set Allocation Mode to Create Volume.
    Existing Volumes Click Select PV. Find the PV that you want to use and click Select in the Actions column.
    Capacity The capacity of the PVC.
    Note The capacity of the PVC cannot exceed the capacity of the PV.
  7. Click Create.
    After you create the PVC, you can find it on the Persistent Volume Claims tab. In this example, a PVC named csi-oss-pvc is created and a PV is bound to the PVC.