Baidu AI Cloud
中国站

百度智能云

Cloud Container Engine

Create Kubernetes Cluster at the Edges

Create Cloud Container Engine for Edge (CCE)

The Cloud Container Engine for Edge is currently in the internal testing stage. The cluster can only be created through custom parameters.

Prerequisites

  • The account has enabled the BEC whitelist;
  • The account has enabled the BEC high-performance network whitelist;
  • Prepare the edge cloud server used to deploy the cluster master through the BEC console. The instance configuration requirements are as follows:

    • Master nodes must all belong to an instance group. The number of master nodes is 1, 3, or 5;
    • The instances must all be in the same region and the same operator;
    • The instances must be bound to the public IP;
    • The operating system uses Centos 7.6;
    • For the instance, recommend you create a data disk, format and mount it in advance;
  • Prepare the edge cloud server used to deploy the cluster Node through the BEC console. The instance configuration requirements are as follows:

    • The instances must be in the same region and belong to the same operator as the Master instance;
    • The instances must be bound to the public IP;
    • The same instance cannot be used as cluster master and node at the same time;
    • The operating system uses Centos 7.6;
    • For the instance, recommend you create a data disk, format and mount it in advance;
    • If the instance has a GPU, you need to install the GPU driver in advance;

Create Cluster

1. Select standard Kubernetes independent cluster through CCE cluster creation page.

image.png

2. Select custom parameters to create a cluster.

image.png

3. Enter the cluster creation configuration parameters.

image.png

Complete example:

{
    "cluster":{
        "clusterName":"edge-cluster-example",
        "k8sVersion":"1.18.9",
        "runtimeType":"docker",
        "runtimeVersion": "18.9.2",
        "clusterType": "edge",
        "masterConfig":{
            "masterType":"containerizedEdge",
            "exposedPublic": true,
            "edgeMasterOption": {
                "region": "EAST_CHINA",
                "city": "NINGBO",
                "serviceProvider": "CHINA_TELECOM",
                "masterLBBandwidthInMbpsLimit": 100
            }
        },
        "containerNetworkConfig":{
            "clusterPodCIDR":"10.0.0.0/16",
            "clusterIPServiceCIDR":"192.168.0.0/16"
        }
    },
    "masters":[
        {
            "instanceSpec":{
            	"machineType": "BEC",
                "existed":true,
                "existedOption":{
                    "existedInstanceID":"vm-pawipiin-1-t-ningbo-ruwyg"
                },
                "adminPassword":""
            }
        }
    ],
    "nodes":[
        {
            "instanceSpec":{
            	"machineType": "BEC",
                "existed":true,
                "existedOption":{
                    "existedInstanceID":"vm-opoxib0g-1-t-ningbo-qb4lu"
                },
                "deployCustomConfig": {
                    "kubeletRootDir": "/var/lib/kubelet",
                    "dockerConfig": {
                        "dockerDataRoot": "/var/lib/docker"
                    }
                },
                "adminPassword":"",
                "needGPU": false
            }
        },
        {
            "instanceSpec":{
            	"machineType": "BEC",
                "existed":true,
                "existedOption":{
                    "existedInstanceID":"vm-azioqqzo-1-t-ningbo-cnyvf"
                },
                "deployCustomConfig": {
                    "kubeletRootDir": "/var/lib/kubelet",
                    "dockerConfig": {
                        "dockerDataRoot": "/var/lib/docker"
                    }
                },
                "adminPassword":"",
                "needGPU": false
            }
        }
    ]
}

Description of parameter configuration:

Cluster Configuration
Parameter Name Description Example
cluster.clusterName Cluster name edge-cluster-example
cluster.k8sVersion k8s Version 1.18.9
cluster.runtimeType Container runtime docker
cluster.runtimeVersion Container runtime version September 02, 2018
cluster.clusterType Cluster type edge
cluster.masterType.masterType Master type, which supports the "edge" and "containerizedEdge” corresponding to the binary-started Master component (The Master node is not taken as the K8S Node) and static Pod-started Master component (The Master node is taken as the K8S Node), respectively edge/containerizedEdge
cluster.masterType.exposedPublic Whether the master exposes the public network access. The Cloud Container Engine for Edge must expose the public network access. true
cluster.masterType.edgeMasterOption.region The region of the BEC instance used to deploy the Master. EAST_CHINA
cluster.masterType.edgeMasterOption.city The city of the BEC instance used to deploy the Master. NINGBO
cluster.masterType.edgeMasterOption.serviceProvider The operator of the BEC instance used to deploy the Master. CHINA_TELECOM
cluster.masterType.edgeMasterOption.masterLBBandwidthInMbpsLimit Master load balancing bandwidth (Mbps) 100
cluster.containerNetworkConfig.clusterPodCIDR The cluster Pod network IP address range cannot conflict with the cluster Service network IP address range and 172.16.0.0/16. 10.0.0.0/16
cluster.containerNetworkConfig.clusterIPServiceCIDR The cluster Service network IP address range, which cannot conflict with the cluster Pod network IP address range and 172.16.0.0/16. 192.168.0.0/16
masters Cluster Master node configuration list. The detailed description of the list items is shown in the following table.
nodes Cluster Node node configuration list. The detailed description of the list items is shown in the following table.
Configuration Items of Master Node
Parameter Name Description Example
instanceSpec.machineType Host type BEC
instanceSpec.existed Whether the instance is already created or not. true
instanceSpec.existedOption.existedInstanceID BEC instance ID vm-pawipiin-1-t-ningbo-ruwyg
instanceSpec.adminPassword The root account password of the BEC instance. In the deployment phase, the cloud control plane needs to log in to the virtual machine through the root account for deployment. It can be changed after the deployment is complete.
Node Configuration Items
Parameter Name Description Example
instanceSpec.machineType The host type BEC
instanceSpec.existed Whether it is already created or not. true
instanceSpec.existedOption.existedInstanceID The BEC instance ID vm-opoxib0g-1-t-ningbo-qb4lu
instanceSpec.deployCustomConfig.kubeletRootDir The kubelet data directory. If the data disk is mounted, recommend you select the data disk mounting directory. /var/lib/kubelet
instanceSpec.deployCustomConfig.dockerConfig.dockerDataRoot The docker data directory. If the data disk is mounted, recommend you select the data disk mounting directory. /var/lib/docker
instanceSpec.adminPassword The root account password of the BEC instance. In the deployment phase, the cloud control plane needs to log in to the virtual machine through the root account for deployment. It can be changed after the deployment is complete.
instanceSpec.needGPU Whether to install a GPU-related container dependency package at the node. Do not need to install a package at the non-GPU node. false

4. Enter cluster creation configuration parameters and click Create to start cluster deployment

Previous
Virtual Node
Next
Scale Out Kubernetes Cluster at the Edges