Updated on 2025-11-17 GMT+08:00

Preparing a CCE Workload

  1. Create a cluster.

    1. Log in to the CCE console. On the Clusters page, buy a CCE Standard or CCE Turbo cluster. Select CCE Standard Cluster and set Network Model to VPC network. For details, see Buying a CCE Cluster.
    2. After the cluster is created, record the container CIDR block.
    3. Add this CIDR block in the Routes area of a dedicated gateway.
      1. Go to the APIG console, and choose Gateways in the navigation pane.
      2. Click the gateway name to go to the details page.
      3. Add the container CIDR block in the Routes area.

  2. Create a workload.

    1. On the Clusters page of the CCE console, click the cluster name to go to the details page.
    2. In the navigation pane, choose Workloads.
    3. Click Create Workload. Select Deployment. For details, see the Cloud Container Engine User Guide.

      In the Advanced Settings > Labels and Annotations area, set pod labels for switching the workload and service version. In this example, set app=deployment-demo and version=v1. If you create a workload by importing a YAML file, add pod labels in this file. For details about pod labels, see Configuring Labels and Annotations.

      Add pod labels in a YAML file:

      spec:
        replicas: 2
        selector:
          matchLabels:
            app: deployment-demo
            version: v1
        template:
          metadata:
            creationTimestamp: null
            labels:
              app: deployment-demo
              version: v1