Updated on 2024-11-11 GMT+08:00

Creating a Node Pool

Scenario

This section describes how to create a node pool and perform operations on the node pool. For details about how a node pool works, see Node Pool Overview.

Procedure

  1. Log in to the CCE console.
  2. Click the cluster name to access the cluster console. Choose Nodes in the navigation pane. In the right pane, click the Node Pools tab.
  3. In the upper right corner of the page, click Create Node Pool.

    Basic Settings

    Table 1 Basic settings

    Parameter

    Description

    Node Pool Name

    Name of a node pool. By default, the name is in the format of Cluster name-nodepool-Random number. If you do not want to use the default name format, you can customize the name.

    Configurations

    You can configure the flavor and OS of a cloud server, on which your containerized applications run.
    Table 2 Node configuration parameters

    Parameter

    Description

    Node Type

    Select a node type based on service requirements. Then, you can select a proper flavor from the node flavor list.

    CCE standard clusters support the following node types:
    • ECS (VM): A virtualized ECS is used as a cluster node.
    CCE Turbo clusters support the following node types:
    • ECS (VM): A virtualized ECS is used as a cluster node. A CCE Turbo cluster supports only the cloud servers that allow multiple ENIs. Select a server type displayed on the CCE console.
    • ECS (physical machine): A QingTian-backed bare metal server is used as a cluster node.

    Specifications

    Select a node flavor based on service requirements. The available node flavors vary depending on regions or AZs. For details, see the CCE console.

    Container Engine

    The container engines supported by CCE include Docker and containerd, which may vary depending on cluster types, cluster versions, and OSs. Select a container engine based on the information displayed on the CCE console. For details, see Mapping Between Node OSs and Container Engines.

    OS

    Select an OS type. Different types of nodes support different OSs.
    • Public image: Select a public image for the node.
    NOTE:

    Service container runtimes share the kernel and underlying calls of nodes. To ensure compatibility, select a Linux distribution version that is the same as or close to that of the final service container image for the node OS.

    Login Mode

    Storage Settings

    Configure storage resources on a node for the containers running on it. Select a disk type and configure its size based on service requirements. For details about EVS disks, see Disk Types and Performance.
    Table 3 Configuration parameters

    Parameter

    Description

    System Disk

    System disk used by the node OS. The value ranges from 40 GiB to 1024 GiB. The default value is 50 GiB.

    Data Disk

    At least one data disk is required for the container runtime and kubelet components. This data disk cannot be deleted or detached. Otherwise, the node will be unavailable.
    • Default data disk: used for container runtime and kubelet components. The disk size ranges from 20 GiB to 32768 GiB. The default value is 100 GiB.
    • Other common data disks: You can set the data disk size to a value ranging from 10 GiB to 32768 GiB. The default value is 100 GiB.
    NOTE:
    • If the node flavor is disk-intensive or ultra-high I/O, one data disk can be a local disk.
    • Local disks may break down and do not ensure data reliability. Store your service data in EVS disks, which are more reliable than local disks.

    Advanced Settings

    Expand the area and configure the following parameters:

    • Data Disk Space Allocation: allocates space for container engines, images, and ephemeral storage for them to run properly. For details about how to allocate data disk space, see Space Allocation of a Data Disk.

    Adding data disks

    A maximum of 16 data disks can be attached to an ECS and 10 to a BMS. By default, a raw disk is created without any processing. You can also click Expand and select any of the following options:

    • Default: By default, a raw disk is created without any processing.
    • Mount Disk: The data disk is attached to a specified directory.

    Network Settings

    Configure networking resources to allow node and containerized application access.
    Table 4 Configuration parameters

    Parameter

    Description

    Virtual Private Cloud

    The VPC to which the cluster belongs by default, which cannot be changed.

    Node Subnet

    The node subnet selected during cluster creation is used by default. You can choose another subnet instead.

    • Multiple subnets: You can select multiple subnets in the same VPC for nodes. Newly added nodes will preferentially use the IP addresses from the top-ranking subnet.
    • Single subnet: Only one subnet is configured for your node pool. If the IP addresses of a single subnet are insufficient, configure multiple subnets. Otherwise, a node pool scale-out may fail.

    Node IP Address

    Random allocation is supported.

    Associate Security Group

    Security group used by the nodes created in the node pool. A maximum of five security groups can be selected.

    When a cluster is created, a node security group named {Cluster name}-cce-node-{Random ID} is created and used by default.

    Traffic needs to pass through certain ports in the node security group to ensure node communications. Ensure that you have enabled these ports if you select another security group.

    NOTE:

    After a node pool is created, its associated security group cannot be modified.

    Advanced Settings

    Configure advanced node capabilities such as labels, taints, and startup command.
    Table 5 Advanced configuration parameters

    Parameter

    Description

    Resource Tag

    You can add resource tags to classify resources.

    You can create predefined tags on the TMS console. The predefined tags are available to all resources that support tags. You can use these tags to improve the tag creation and resource migration efficiency.

    CCE will automatically create the "CCE-Dynamic-Provisioning-Node=Node ID" tag.

    Kubernetes Label

    A key-value pair added to a Kubernetes object (such as a pod). After specifying a label, click Add Label for more. A maximum of 20 labels can be added.

    Labels can be used to distinguish nodes. With workload affinity settings, container pods can be scheduled to a specified node. For more information, see Labels and Selectors.

    Taint

    This parameter is left blank by default. You can add taints to configure anti-affinity for the node. A maximum of 20 taints are allowed for each node. Each taint contains the following parameters:
    • Key: A key must contain 1 to 63 characters, starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain name can be used as the prefix of a key.
    • Value: A value must contain 1 to 63 characters, starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.
    • Effect: Available options are NoSchedule, PreferNoSchedule, and NoExecute.

    For details, see Managing Node Taints.

    NOTE:

    For a cluster of v1.19 or earlier, the workload may have been scheduled to a node before the taint is added. To avoid such a situation, select a cluster of v1.19 or later.

    Synchronization for Existing Nodes

    After the options are selected, changes to resource tags and Kubernetes labels/taints in a node pool will be synchronized to existing nodes in the node pool.

    Max. Pods

    Maximum number of pods that can run on the node, including the default system pods.

    This limit prevents the node from being overloaded with pods.

    This number is also decided by other factors. For details, see Maximum Number of Pods That Can Be Created on a Node.

    ECS Group

    An ECS group logically groups ECSs. The ECSs in the same ECS group comply with the same policy associated with the ECS group.

    Anti-affinity: ECSs in an ECS group are deployed on different physical hosts to improve service reliability.

    Select an existing ECS group, or click Add ECS Group to create one. After the ECS group is created, click the refresh icon.

    Pre-installation Command

    Installation script command, in which Chinese characters are not allowed. The script command will be Base64-transcoded.

    The script will be executed before Kubernetes software is installed. Note that if the script is incorrect, Kubernetes software may fail to be installed.

    Post-installation Command

    Installation script command, in which Chinese characters are not allowed. The script command will be Base64-transcoded.

    The script will be executed after Kubernetes software is installed, which does not affect the installation.

    NOTE:

    Do not run the reboot command in the post-installation script to restart the system immediately. To restart the system, run the shutdown -r 1 command to restart with a delay of one minute.

    Agency

    An agency is created by the tenant administrator on the IAM console. Using an agency, you can share your cloud server resources with another account, or entrust a more professional person or team to manage your resources.

    If no agency is available, click Create Agency on the right to create one.

  4. Click Next: Confirm.
  5. Click Submit.

Related Operations

By default, the total number of nodes in a node pool is set to 0 upon creation. You will need to manually increase the number of nodes. For details, see Scaling a Node Pool.