In the Container Service console, use an image or a template to deploy an application, so that you can use a persistent volume claim (PVC). In this example, an image is used to create an application.  If you want to use a PVC through a template, see Use Alibaba Cloud cloud disk volumes.

Prerequisites

Procedure

  1. Log on to the Container Service console.
  2. In the left-side navigation pane under Kubernetes, choose Application > Deployment. Then click Create by Image in the upper-right corner.


  3. Set the application name and select the target cluster and the namespace. Then click Next


  4. Select an image, set the data volume of disk type, and then click Next. Disk, NAS, and OSS types are available. In this example, an existing disk PVC is used.


  5. Set services for the test-nginx application, and then click Create.
  6. In the left-side navigation pane, choose Application > Pods. Then click Details on the right of the pod to which the test-nginx application belongs.


  7. Click Volumes to verify that the target pod is associated with the pvc-disk.