Third-party data volumes are used in the same way as local data volumes.

You can set the data volumes when creating an application or changing the configurations of an existing application.

Prerequisite

You have created a data volume in Container Service console. For details, see Create an OSSFS data volume .

Procedure

Take the OSSFS data volume test in the test cluster as an example.


Create an application by using an image

  1. Log on to the Container Service console.
  2. Click Applications in the left-side navigation pane.
  3. Click Create Application in the upper-right corner.
  4. Enter the basic information for the application you want to create and then click Create with Image. In this example, enter volume as the Name and select test as the Cluster.
    Note
    The cluster on which the application will be deployed must be the same as the one of the  OSSFS data volume that you want to use.


  5. Select the image you want to use and complete the other configurations.
    Note
    For how to create an application by using an image, see  Create an application .
  6. Click the plus icon in the Volume section. Enter the data volume name in the Host Path or Data Volume Name field. Enter the Container Path and select RW or RO as the data volume permission.


  7. Click Create at the right of the page after completing the settings.
    On the Data Volume List page, you can see that the OSSFS data volume test is referenced by the container of the volume application.


Create an application by using an orchestration template

  1. Log on to the Container Service console.
  2. Click Applications in the left-side navigation pane.
  3. Click Create Application in the upper-right corner.
  4. Enter the basic information for the application you want to create and then click Create with Orchestration Template. In this example, enter volume as the Name and select test as the Cluster.
    Note
    The cluster on which the application will be deployed must be the same as the one of the OSSFS data volume that you want to use.


  5. Click Use Existing Orchestration Template or use your own orchestration template.
    Note
    For how to create an application by using an orchestration template, see Create an application .
  6. In the volumes section of the template, enter the data volume name, container path, and permission.


  7. Click Create and Deploy after completing the settings.
    On the Data Volume List page, you can see that the OSSFS data volume test is referenced by the container of the volume application.


Change the configurations of an existing application

  1. Log on to the Container Service console.
  2. Click Applications in the left-side navigation pane.
  3. Select the cluster (the test cluster in this example) in which the application resides from the Cluster list. Click Update next to the application you want to change the configurations.

    For how to change the application configurations, see Change application configurations.

    Note
    Make sure the application and the OSSFS data volume you want to use are in the same cluster.
  4. The Change Configuration dialog box appears. In the  volumes  section of the template, enter the data volume name, container path, and permission.


  5. Click OK after completing the modifications.
    On the Data Volume List page, you can see that the OSSFS data volume test is referenced by the container of the volume application.