• Cloud Container Engine

  1. Help Center
  2. Cloud Container Engine
  3. User Guide 2.0
  4. Data Migration from an Earlier Version to the Latest Version
  5. Migrating an Application
  6. Applications Created Through Component Templates

Applications Created Through Component Templates

If the application in the earlier CCE version is created using a component template, follow the steps this section to migrate the application to the latest CCE version.

Figure 1 shows an example of a component template created in the earlier CCE version.

Figure 1 Component template in the earlier CCE version

Migration Method

Create an application in the console of the latest CCE version. Delete the application from the earlier CCE version only after the application is successfully run in the latest CCE version.


  1. In the navigation pane, choose Application Management. On the page that is displayed, click Create Application, and choose Stateless Applications.
  2. Set basic application parameters as described in Table 1. The parameters marked with an asterisk (*) are mandatory.

    Table 1 Basic application parameters



    * Application Name

    Name of the containerized application to be created, which must be unique.

    * Cluster Name

    Cluster where the application resides.

    * Namespace

    Namespace where the application resides. By default, this parameter is set to default.

    Application Group

    You can manage (start, stop, and delete) applications in batches by adding these applications to the same application group.

    When you enter an application group name, a user group is automatically created.

    * Instances

    Number of instances in the application. An application has one or more instances. You can specify the number of instances as required.

    Each application instance consists of the same containers. Configuring multiple instances for an application can ensure high reliability of the application. For such an application, if an instance is faulty, the application can still run properly.


    Description of the application.

  3. Click Next to add a container.

    1. Click Add Container and select the image to be deployed. Click OK.
    2. Set image parameters.
      Table 2 Image parameters

      New Parameter

      Old Parameter


      Image Name

      Container Image

      Imported image. You can click Change Image to update it.

      * Image Version

      Version of the image to be deployed.

      * Container Name

      Name of the container. You can modify it.

      Privileged Pod

      If this option is selected, the container obtains the privileged permission, for example, modifying kernel parameters.

      Container Resources

      Memory, CPU

      • Request: the amount of resources that CCE will guarantee to a container.
      • Limit: the maximum amount of resources that CCE will allow a container to use. You can set Limit to prevent system faults caused by container overload.
    3. Set the environment variables, data storage, and user-defined log.
      Table 3 Advanced settings

      New Parameter

      Old Parameter


      Environment Variables

      Environment Variables

      Variables set in the container running environment. They can be modified after application deployment to ensure the flexibility of applications.
      1. Click Add Environment Variable.
      2. Set Type to Manually Addition.
      3. Set Variable Name and Variable/Variable Reference.

      Data Storage


      For the application in Figure 1, perform the following operations:

      1. Choose Data Storage > Local Disks. On the page that is displayed, click Add Local Disk.
      2. Select HostPath.

        Set the following parameters

        • Host Path: Path of the host to which the local volume is to be mounted, corresponding to /tmp of Volumes in Figure 1.
        • Click Add Container Path, enter the container path to which the data volume is mounted. It corresponds to /test of Volumes in Figure 1.
        • Permission: Read/Write.
      3. Click OK.

      Security Context

      This parameter is not available in the earlier CCE version. For migrated applications, you do not need to set this parameter.

      Set container permissions to prevent the container from affecting the system and other containers.

      Log Policies

      This parameter is not available in the earlier CCE version. For migrated applications, you do not need to set this parameter.

      Set a policy and log directory for collecting application logs and preventing logs from being over-sized. For details, see Log Management.

  4. Click Next. Then, click Add Access Mode, and set the application access mode parameters.

    The application access mode determines the network attributes of an application. Applications with different access modes can provide different network capabilities. For details about the four access modes provided, see Application Access Settings.

    • Service Name: Specify a service name. You can use the application name as the service name.
    • Access Mode: Select External access.
    • Access Type: Select ELB.
    • Container Port: Specify a port on which the application listens. The Nginx application listens on port 80.
    • Access Port: Specify a port to map a container port to the IP address of an ELB service. The port range is 1–65535. The port will be used when the application is accessed using the IP address of an ELB service.
    • Protocol: Select a protocol based on the service requirements.

  5. Click OK, and Click Next. Skip the advanced settings.
  6. Click Create Now. Click Back to Application List.

    In the application list, if the application status is Running, the application has been created successfully. Application status is not updated in real time. To view the application status, press F5.

  7. In the application list on the Application Management page, copy External Access Address to access the application in the browser.


    External access addresses can be obtained only when the application access mode is set to Elastic IP Address or Elastic Load Balancer.