Updated on 2025-03-04 GMT+08:00

Creating a Node

Function

This API is used to create a node in a specified cluster.

  • If there is no cluster, create one.
  • The URL for cluster management is in the format of https://Endpoint/uri. In the URL, uri indicates the resource path, that is, the path for API access.

Constraints

Only KVM nodes can be created. Non-KVM nodes cannot be used after being created.

URI

POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

cluster_id

Yes

String

Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

nodepoolScaleUp

No

String

Whether the request is delivered by the node pool. If the value is not NodepoolScaleUp, the number of pods in the corresponding node pool is automatically updated.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format).

X-Auth-Token

Yes

String

Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token.

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

kind

Yes

String

API type. The value is fixed at Node and cannot be changed.

apiVersion

Yes

String

API version. The value is fixed at v3 and cannot be changed.

metadata

No

NodeMetadata object

Node metadata, which is a collection of attributes.

spec

Yes

NodeSpec object

Detailed description of the node. CCE creates or updates objects by defining or updating spec.

Table 5 NodeMetadata

Parameter

Mandatory

Type

Description

name

No

String

Node name.

NOTE:

Enter 1 to 56 characters starting with a lowercase letter and not ending with a hyphen (-). Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. If name is not configured or is left blank, the node name is generated based on the default rule, which is Cluster name-Random characters. Only the first 36 characters are kept for a long cluster name. If the number of nodes (count) is greater than 1, some random characters are added to the end of the entered node name according to the default rule, which is User-defined name-Random characters. If the length of the entered node name exceeds 50 characters, the system uses the first 50 characters and adds a random character string to the end of the name.

uid

No

String

Node ID, which is unique and automatically generated after the resource is created. A user-defined ID will not take effect.

labels

No

Map<String,String>

CCE node label (not the native Kubernetes label).

Labels are used to select objects that meet certain criteria. A label is a key-value pair.

Example:

"labels": {
  "key" : "value"
}

annotations

No

Map<String,String>

CCE node annotations, in key-value pairs (not the native Kubernetes annotations). Example:

"annotations": {
  "key1" : "value1",
  "key2" : "value2"
}
NOTE:
  • annotations are not used to identify or select objects. The metadata in annotations may be small or large, structured or unstructured, and may include characters that are not allowed in labels.
  • This parameter is used only for query and cannot be input through a request. Entered data of this parameter is invalid.

creationTimestamp

No

String

Time when the object was created. The value is automatically generated after the object is created. A user-defined value will not take effect.

updateTimestamp

No

String

Time when the object was updated. The value is automatically generated after the object is created. A user-defined value will not take effect.

ownerReference

No

ownerReference object

Owner object

Table 6 ownerReference

Parameter

Mandatory

Type

Description

nodepoolName

No

String

Node pool name

nodepoolID

No

String

Node pool UID

Table 7 NodeSpec

Parameter

Mandatory

Type

Description

flavor

Yes

String

Node specifications. For details about the node specifications supported by CCE, see Node Flavor Description.

az

Yes

String

AZ where the node to be created is located. You need to specify the AZ name. A node created using APIs does not support random AZs.

NOTE:
  • When you are creating a node pool and configuring a scaling group, this parameter cannot be set to random.

os

No

String

Node OS. For details about the supported OSs, see Node OS.

NOTE:
  • The system automatically selects the supported OS based on the cluster version. If the current cluster version does not support the OS, an error will be reported.
  • If alpha.cce/NodeImageID in extendParam is specified during node creation, you do not need to configure this parameter.
  • This parameter is mandatory when creating a node pool.
  • If you are using shared disk space when creating a node, this parameter is mandatory. Specifically, the disk initialization configuration management parameter storage is used and the name field of virtualSpaces in StorageGroups is set to share.

login

Yes

Login object

Node login mode. Either the key pair or password must be used for login.

NOTE:

This parameter cannot be modified when a node pool is being updated.

rootVolume

Yes

Volume object

Information about disks on the node

dataVolumes

Yes

Array of Volume objects

Data disk parameters of a node. A VM can have up to 16 disks attached, while a BMS can only have up to 10 disks attached. The maximum number of disks that can be attached to either a VM or BMS is limited by their respective maximum disk limits. (You can add more data disks to each of your nodes through the CCE console and APIs.) The data disk used by the container runtime and kubelet cannot be detached, or the node will become unavailable. For DeC nodes, the parameter details are the same as those for rootVolume.

storage

No

Storage object

Disk initialization management parameter.

This parameter is complex to configure. For details, see Attaching Disks to a Node.

NOTE:
  • If a node has both local and EVS disks attached, make sure to not keep the default value for this parameter, or it may result in unexpected disk partitions.
NOTE:
  • If you want to change the value range of a data disk to 20 to 32768, do not use the default value.
NOTE:
  • If you want to use the shared disk space (with the runtime and Kubernetes partitions cancelled), do not retain the default value of this parameter. For details about the shared disk space, see Data Disk Space Allocation.

publicIP

No

NodePublicIP object

EIP of a node.

NOTE:

This parameter is not supported when you add a node to a node pool.

nodeNicSpec

No

NodeNicSpec object

NIC of the node

count

No

Integer

Number of nodes to be created in a batch. The value must be a positive integer greater than or equal to 1 and less than or equal to the defined limit. This parameter can be left blank when it is used for a node pool.

billingMode

No

Integer

Node billing mode.

  • 0: pay-per-use

taints

No

Array of Taint objects

You can add taints to created nodes to configure anti-affinity. A maximum of 20 taints can be added. Each taint contains the following parameters:

  • Key: Enter 1 to 63 characters starting and ending with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key.
  • Value: Enter 1 to 63 characters starting and ending with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.
  • Effect: Available options are NoSchedule, PreferNoSchedule, and NoExecute. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.

Example:

"taints": [{
  "key": "status",
  "value": "unavailable",
  "effect": "NoSchedule"
}, {
  "key": "looks",
  "value": "bad",
  "effect": "NoSchedule"
}]

k8sTags

No

Map<String,String>

Defined in key-value pairs. A maximum of 20 key-value pairs are allowed.

  • Key: Enter 1 to 63 characters starting and ending with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain containing a maximum of 253 characters (such as example.com/my-key) can be prefixed to a key.
  • Value: The value can be left blank or contain 1 to 63 characters that start and end with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.

Example:

"k8sTags": {
  "key": "value"
}

ecsGroupId

No

String

ECS group ID. If this parameter is configured, nodes will be created in the specified ECS group.

NOTE:

This configuration does not take effect when a node pool is created. To ensure that all nodes in a node pool are in the same ECS group, configure nodeManagement in the node pool.

dedicatedHostId

No

String

ID of the DeH to which the node is scheduled.

NOTE:

This parameter is not supported when you add a node during node pool creation.

userTags

No

Array of UserTag objects

Cloud server tag (resource tag). The key of a tag must be unique. The maximum number of custom tags supported by CCE varies depending on regions and cannot exceed 8. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.

NOTE:

A tag key can have a maximum of 36 characters. It can only contain letters, digits, Unicode characters, and special characters (-_).

runtime

No

Runtime object

Container runtime. Default value:

  • Clusters earlier than v1.25: The default value is docker.
  • Clusters of v1.25 or later: The default container runtime varies depending on the OS. For nodes running EulerOS 2.5, the default container runtime is docker; for nodes running other OSs, the default container runtime is containerd.

initializedConditions

No

Array of strings

Custom initialization flag, which is left blank by default.

Before CCE nodes are initialized, node.cloudprovider.kubernetes.io/uninitialized is added to the nodes to prevent pods from being scheduled to these nodes. When creating a node, you can configure the initializedConditions parameter to control the taint removal time. By default, the timeout period is not configured.

Example:

  1. Create a node and add parameter "initializedConditions": ["CCEInitial", "CustomedInitial"].
  2. After custom initialization is complete, CCE will call a Kubernetes API (for example, PATCH /v1/nodes/{node_ip}/status) to update the node conditions by adding two labels of types CCEInitial and CustomedInitial and setting the status to True, as shown in the following:
status:
  conditions:
  - type: CCEInitial
    status: 'True'
  - type: CustomedInitial
    status: 'True'
  1. CCE polls status.Conditions of nodes to check whether there are conditions of types CCEInitial and CustomedInitial. If such conditions exist and the status is True, the node initialization is complete and the initialization taint is removed.
  2. initializedConditions allows you to configure a timeout period during node creation. For example, "initializedConditions": ["CCEInitial:15m", "CustomedInitial:15m"] indicates that the timeout period is 15 minutes. After the timeout period is reached, the initialization conditions will be automatically ignored and the initialization taint will be removed when CCE polls the node.
  • The timeout interval in initializedConditions ranges from 1 to 99 seconds.
  • Use only letters and digits. Max. characters: 20.
  • Max. flags: 2.
  • The unit of the timeout period is minute (m).

extendParam

No

NodeExtendParam object

Extended parameters for creating a node.

hostnameConfig

No

HostnameConfig object

Kubernetes node name configuration parameter, which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions.

serverEnterpriseProjectID

No

String

Enterprise project ID of a server. CCE does not support features provided by EPS. This field is used only for synchronizing enterprise project IDs of servers. To create a node or node pool, you can specify an existing enterprise project for it. If this field is left blank, it inherits the enterprise project attributes of the cluster that runs the node or node pool. When updating a node pool, any configuration modifications you made will apply only to new nodes. You need to modify the enterprise projects of existing nodes on the EPS console. If no value is specified during the update, this field will not be updated. If this parameter is left blank, the cluster enterprise project is returned.

Table 8 Login

Parameter

Mandatory

Type

Description

sshKey

No

String

Name of the key pair used for login.

userPassword

No

UserPassword object

Password used for node login.

Table 9 UserPassword

Parameter

Mandatory

Type

Description

username

No

String

Login account. The default value is root.

password

Yes

String

Login password. If a username and password are used to create a node, this field is shielded in the response body. A password must meet the following complexity requirements:

  • Contains 8 to 26 characters.
  • Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters !@$%^-_=+[{}]:,./?
  • Cannot contain the username or the username spelled backwards. The password field must be salted during node creation. For details, see Adding a Salt in the password Field When Creating a Node.
Table 10 Volume

Parameter

Mandatory

Type

Description

size

Yes

Integer

Disk size, in GiB.

  • System disk: 40 to 1024
  • Value range for data disks: 100 to 32768

volumetype

Yes

String

Disk type. For details about possible values, see the description of the root_volume parameter in the API used to create an ECS.

  • SAS: high I/O SAS disk
  • SSD: ultra-high I/O SSD disk
  • SATA: common I/O SATA disk SATA disks have been removed from EVS. You can find them attached only on existing nodes.

extendParam

No

Map<String,Object>

Extended disk parameters, defined in extendparam in the API used to create an ECS.

cluster_id

No

String

ID of the storage pool used by the ECS system disk. This field is used only for DeC clusters, which functions as dssPoolID, that is, the ID of the DSS storage pool.

cluster_type

No

String

Storage class of the cloud server system disk. The value is always dss. This field is used only for DeC clusters.

hw:passthrough

No

Boolean

  • Pay attention to this field if your ECS is SDI-compliant. If the value of this field is true, the created disk is of SCSI type.
  • If the node pool type is ElasticBMS, this field must be set to true.
  • If a node specification involves both local and EVS disks, configure the disk initialization parameters. For details, see Attaching Disks to a Node.

metadata

No

VolumeMetadata object

EVS disk encryption information. This field is mandatory only when you need to encrypt the system disk or data disks of the node to be created.

Table 11 VolumeMetadata

Parameter

Mandatory

Type

Description

__system__encrypted

No

String

Whether the EVS disk is encrypted. The value 0 indicates that the EVS disk is not encrypted, and the value 1 indicates that the EVS disk is encrypted.

If this parameter is not specified, EVS disks will not be encrypted by default.

__system__cmkid

No

String

CMK ID, which indicates encryption in metadata. This field is used with __system__encrypted.

Table 12 Storage

Parameter

Mandatory

Type

Description

storageSelectors

Yes

Array of StorageSelectors objects

Disk selection. Matched disks are managed according to matchLabels and storageType.

storageGroups

Yes

Array of StorageGroups objects

A storage group consists of multiple storage devices. It is used to divide storage space.

Table 13 StorageSelectors

Parameter

Mandatory

Type

Description

name

Yes

String

Selector name, used as the index of selectorNames in storageGroup. Therefore, the name of each selector must be unique.

storageType

Yes

String

Storage type. Only evs (EVS disks) and local (local disks) are supported. The local storage does not support disk selection. All local disks will form a VG, so only one storageSelector of the local type is allowed.

matchLabels

No

matchLabels object

Matching field of an EVS disk. The value can be size, volumeType, metadataEncrypted, metadataCmkid, or count in DataVolume.

Table 14 matchLabels

Parameter

Mandatory

Type

Description

size

No

String

Matched disk size. If this parameter is left unspecified, the disk size is not limited. Example: 100

volumeType

No

String

EVS disk type. SSD, GPSSD, SAS, ESSD, and SATA are supported. If this parameter is left blank, there is no restriction on the disk type.

metadataEncrypted

No

String

Disk encryption identifier. If this parameter is set to 0, it specifies that the disk is not encrypted. If this parameter is set to 1, it specifies that the disk is encrypted. If this parameter is left blank, there is no restriction on the disk encryption identifier.

metadataCmkid

No

String

CMK ID of an encrypted disk. The value is a string of 36 bytes. If this parameter is left blank, there is no restriction on the disk key ID.

count

No

String

Number of disks to be selected. If this parameter is left blank, all disks of this type are selected.

Table 15 StorageGroups

Parameter

Mandatory

Type

Description

name

Yes

String

Name of a virtual storage group, which must be unique.

NOTE:
  • If cceManaged is set to true, the name must be set to vgpaas.
  • If the data disk is used as a temporary storage volume, the name must be vg-everest-localvolume-ephemeral.
  • If the data disk is used as a persistent storage volume, the name must be vg-everest-localvolume-persistent.

cceManaged

No

Boolean

Storage space for Kubernetes and runtime components. Only one group can be set to true. If this parameter is left blank, the default value false is used.

selectorNames

Yes

Array of strings

Corresponds to name in storageSelectors. One group can select multiple selectors, but one selector can be selected by only one group.

virtualSpaces

Yes

Array of VirtualSpace objects

Detailed management of space configuration in a group.

Table 16 VirtualSpace

Parameter

Mandatory

Type

Description

name

Yes

String

Name of a virtualSpace. Options: share, kubernetes, runtime, and user

  • share: shared space configuration (with the runtime and Kubernetes partitions cancelled). lvmConfig needs to be configured.
  • Kubernetes: Kubernetes space configuration. lvmConfig needs to be configured.
  • runtime: runtime space configuration. runtimeConfig needs to be configured.
  • user: user space configuration. lvmConfig needs to be configured.

size

Yes

String

Size of a virtualSpace. The value must be an integer in percentage. Example: 90%.

NOTE:

The value ranges from 10 to 90. The sum of percentages of all virtualSpaces in a group cannot exceed 100%.

lvmConfig

No

LVMConfig object

LVM configuration managements, applicable to the share*, kubernetes, and user spaces. Note that one virtual space supports only one config.

runtimeConfig

No

RuntimeConfig object

runtime configurations, applicable to the runtime space. Note that one virtual space supports only one config.

Table 17 LVMConfig

Parameter

Mandatory

Type

Description

lvType

Yes

String

LVM write mode. linear indicates the linear mode. striped indicates the striped mode, in which multiple disks are used to form a strip to improve disk performance.

path

No

String

Disk mount path. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed.

NOTE:

Do not leave the path empty or set it to a key OS path such as the root directory. Key OS paths that cannot be specified: /, /home, /home/, /bin, /bin/, /lib, /lib/, /root, /root/, /boot, /boot/, /dev, /dev/, /etc, /etc/, /lost+found, /lost+found/, /mnt, /mnt/, /proc, /proc/,/sbin, /sbin/, /srv, /srv/, /tmp, /tmp/, /var, /var/, /media, /media/, /opt, /opt/, /selinux, /selinux/, /sys, /sys/, /usr, /usr/, /opt/cloud/, /mnt/paas/, /home/paas/, /var/paas/, /var/lib/, /var/script/

Table 18 RuntimeConfig

Parameter

Mandatory

Type

Description

lvType

Yes

String

LVM write mode. linear indicates the linear mode. striped indicates the striped mode, in which multiple disks are used to form a strip to improve disk performance.

Table 19 NodePublicIP

Parameter

Mandatory

Type

Description

ids

No

Array of strings

IDs of existing EIPs. The quantity cannot be greater than the number of nodes to be created.

NOTE:

If ids has been set, you do not need to set count and eip.

count

No

Integer

Number of EIPs to be dynamically created.

NOTE:

count and eip must be set at the same time.

eip

No

NodeEIPSpec object

EIP configuration.

NOTE:

This parameter is not supported when creating a node pool.

Table 20 NodeEIPSpec

Parameter

Mandatory

Type

Description

iptype

Yes

String

EIP type, specified in publicip.type in the API for assigning an EIP.

bandwidth

No

NodeBandwidth object

Bandwidth parameters of the EIP

Table 21 NodeBandwidth

Parameter

Mandatory

Type

Description

chargemode

No

String

Bandwidth billing mode.

  • If this field is not specified, the billing is based on bandwidth.
  • If the field is null, the billing is based on bandwidth.
  • If the field value is traffic, the billing is based on traffic.
  • If the value is out of the preceding options, the cloud server will fail to be created.
NOTE:
  • Billed by bandwidth: The billing will be based on the data transmission rate (in Mbps) of public networks. This billing mode is recommended if your bandwidth usage is higher than 10%.
  • Billed by traffic: The billing is based on the total amount of data (in GB) transmitted over the public network. This mode is available only when you are creating a pay-per-use node. This billing mode is recommended if your bandwidth usage is lower than 10%.

size

No

Integer

Bandwidth size, specified in bandwidth.size in the API for assigning an EIP.

sharetype

No

String

Bandwidth sharing type. Value options: PER (exclusive bandwidth)

Table 22 NodeNicSpec

Parameter

Mandatory

Type

Description

primaryNic

No

NicSpec object

Description of the primary NIC.

extNics

No

Array of NicSpec objects

Extension NIC

NOTE:

This parameter is not supported when you add a node to a node pool.

Table 23 NicSpec

Parameter

Mandatory

Type

Description

subnetId

No

String

Network ID of the subnet to which a NIC belongs. If subnetId is not specified when a primary NIC is creating, the cluster subnet will be used. If subnetList is also configured for a node pool, the subnetList field is used for adding subnets to the node pool. When creating an extension NIC, you must specify subnetId.

fixedIps

No

Array of strings

The IP address of the primary ENI is specified using fixedIps. The number of IP addresses cannot be greater than the number of created nodes. Either fixedIps or ipBlock can be specified. fiexdIps cannot be specified for extension ENIs.

ipBlock

No

String

CIDR format of the primary NIC IP range. The IP address of the created node falls in this range. fixedIps and ipBlock cannot be specified at the same time.

subnetList

No

Array of strings

Network ID list of the subnet where the NIC resides. A maximum of 20 subnets can be configured for a node pool.

Table 24 Taint

Parameter

Mandatory

Type

Description

key

Yes

String

Key.

value

No

String

Value.

effect

Yes

String

Effect.

Table 25 UserTag

Parameter

Mandatory

Type

Description

key

No

String

Key of the cloud server label. The value cannot start with CCE- or __type_baremetal.

value

No

String

Value of the cloud server label.

Table 26 Runtime

Parameter

Mandatory

Type

Description

name

No

String

Container runtime. Default value:

  • Clusters earlier than v1.25: The default value is docker.
  • Clusters of v1.25 or later: The default container runtime varies depending on the OS. For nodes running EulerOS 2.5, the default container runtime is docker; for nodes running other OSs, the default container runtime is containerd.
Table 27 NodeExtendParam

Parameter

Mandatory

Type

Description

ecs:performancetype

No

String

ECS flavor types. This field is returned in the response.

maxPods

No

Integer

Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256.

This limit prevents the node from being overloaded of pods.

The number of pods that can be created on a node is determined by multiple parameters. For details, see Maximum Number of Pods That Can Be Created on a Node.

DockerLVMConfigOverride

No

String

Docker data disk configuration item. (This parameter has been discarded. Use the storage field instead.) Example default configuration:

"DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear"

By default, if no VD disk is available, an error occurs because the data disk fails to be found. Set diskType based on the actual drive letter type. The following fields are included:

  • userLV (optional): size of the user space, for example, vgpaas/20%VG.
  • userPath (optional): mount path of the user space, for example, /home/wqt-test.
  • diskType: disk type. Currently, only evs, hdd, and ssd are supported.
  • lvType: type of a logic volume. The value can be linear or striped.
  • dockerThinpool: Docker space size, for example, vgpaas/60%VG.
  • kubernetesLV: kubelet space size, for example, vgpaas/20%VG.

dockerBaseSize

No

Integer

Available disk space of a single container on a node, in GB. This parameter has been discarded. Use containerBaseSize.

If this parameter is left blank or is set to 0, the default value is used. In Device Mapper mode, the default value is 10. In OverlayFS mode, the available space of a single container is not limited by default, and the dockerBaseSize setting takes effect only on nodes running EulerOS in clusters of the new versions.

For details about how to allocate the space for the container runtime, see Data Disk Space Allocation.

When Device Mapper is used, it is recommended that dockerBaseSize be set to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device.

containerBaseSize

No

Integer

Available disk space of a single container on a node, in GiB.

If this parameter is left blank or is set to 0, the default value is used. In OverlayFS mode, the available space of a single container is not limited by default. In Device Mapper mode, the default value is 10, and the containerBaseSize setting takes effect only on nodes running EulerOS in clusters v1.23.14-r0, v1.25.9-r0, v1.27.6-r0, v1.28.4-r0 or later.

For details about how to allocate the space for the container runtime, see Data Disk Space Allocation.

When Device Mapper is used, it is recommended that containerBaseSize be set to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device. In new versions, the Device Mapper mode is used only by BMSs in the same resource pool and is being discarded.

NOTE:

This parameter cannot be updated when a node pool is being updated.

publicKey

No

String

Public key of a node.

alpha.cce/preInstall

No

String

Pre-installation scripts. The total number of characters after transcoding cannot exceed 10240.

NOTE:

The input value must be encoded using Base64. The method is as follows:

echo -n "Content to be encoded" | base64

alpha.cce/postInstall

No

String

Post-installation scripts. The total number of characters after transcoding cannot exceed 10240.

NOTE:

The input value must be encoded using Base64. The method is as follows:

echo -n "Content to be encoded" | base64

alpha.cce/NodeImageID

No

String

This parameter is required when a custom image is used to create a BMS node.

chargingMode

No

Integer

Billing mode of a node. This parameter has been deprecated. Use the billingMode parameter in NodeSpec.

agency_name

No

String

Name of an agency

An agency is created by a tenant administrator on Identity and Access Management (IAM) to provide temporary credentials for CCE nodes to access cloud servers. This parameter is returned only when it is transferred during node creation.

kubeReservedMem

No

Integer

Reserved node memory, which is reserved for Kubernetes components.

systemReservedMem

No

Integer

Reserved node memory, which is reserved for system components.

init-node-password

No

String

Node password. If this parameter is used as a response parameter, asterisks (*) will be displayed.

Table 28 HostnameConfig

Parameter

Mandatory

Type

Description

type

Yes

String

Configuration type of the Kubernetes node name. The default value is privateIp.

  • privateIp: The Kubernetes node is named after its IP address.
  • cceNodeName: The Kubernetes node is named after the CCE node.
NOTE:
  • For a node which is configured using cceNodeName, the name is the same as the Kubernetes node name and the ECS name. The node name cannot be changed. If the ECS name is changed on the ECS console, the node name will retain unchanged after ECS synchronization.
  • For a node which is configured using cceNodeName, to avoid a conflict between Kubernetes nodes, the system automatically adds a suffix to each node name. The suffix is in the format of A hyphen (-) Five random characters. The value of the random characters is a lowercase letter or a digit ranging from 0 to 9.

Response Parameters

Status code: 201

Table 29 Response body parameters

Parameter

Type

Description

kind

String

API type. The value is fixed at Node and cannot be changed.

apiVersion

String

API version. The value is fixed at v3 and cannot be changed.

metadata

NodeMetadata object

Node metadata, which is a collection of attributes.

spec

NodeSpec object

Detailed description of the node. CCE creates or updates objects by defining or updating spec.

status

NodeStatus object

Node status, which is dynamically recorded. A user-defined value will not function when a node is being created or modified.

Table 30 NodeMetadata

Parameter

Type

Description

name

String

Node name.

NOTE:

Enter 1 to 56 characters starting with a lowercase letter and not ending with a hyphen (-). Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. If name is not configured or is left blank, the node name is generated based on the default rule, which is Cluster name-Random characters. Only the first 36 characters are kept for a long cluster name. If the number of nodes (count) is greater than 1, some random characters are added to the end of the entered node name according to the default rule, which is User-defined name-Random characters. If the length of the entered node name exceeds 50 characters, the system uses the first 50 characters and adds a random character string to the end of the name.

uid

String

Node ID, which is unique and automatically generated after the resource is created. A user-defined ID will not take effect.

labels

Map<String,String>

CCE node label (not the native Kubernetes label).

Labels are used to select objects that meet certain criteria. A label is a key-value pair.

Example:

"labels": {
  "key" : "value"
}

annotations

Map<String,String>

CCE node annotations, in key-value pairs (not the native Kubernetes annotations). Example:

"annotations": {
  "key1" : "value1",
  "key2" : "value2"
}
NOTE:
  • annotations are not used to identify or select objects. The metadata in annotations may be small or large, structured or unstructured, and may include characters that are not allowed in labels.
  • This parameter is used only for query and cannot be input through a request. Entered data of this parameter is invalid.

creationTimestamp

String

Time when the object was created. The value is automatically generated after the object is created. A user-defined value will not take effect.

updateTimestamp

String

Time when the object was updated. The value is automatically generated after the object is created. A user-defined value will not take effect.

ownerReference

ownerReference object

Owner object

Table 31 ownerReference

Parameter

Type

Description

nodepoolName

String

Node pool name

nodepoolID

String

Node pool UID

Table 32 NodeSpec

Parameter

Type

Description

flavor

String

Node specifications. For details about the node specifications supported by CCE, see Node Flavor Description.

az

String

AZ where the node to be created is located. You need to specify the AZ name. A node created using APIs does not support random AZs.

NOTE:
  • When you are creating a node pool and configuring a scaling group, this parameter cannot be set to random.

os

String

Node OS. For details about the supported OSs, see Node OS.

NOTE:
  • The system automatically selects the supported OS based on the cluster version. If the current cluster version does not support the OS, an error will be reported.
  • If alpha.cce/NodeImageID in extendParam is specified during node creation, you do not need to configure this parameter.
  • This parameter is mandatory when creating a node pool.
  • If you are using shared disk space when creating a node, this parameter is mandatory. Specifically, the disk initialization configuration management parameter storage is used and the name field of virtualSpaces in StorageGroups is set to share.

login

Login object

Node login mode. Either the key pair or password must be used for login.

NOTE:

This parameter cannot be modified when a node pool is being updated.

rootVolume

Volume object

Information about disks on the node

dataVolumes

Array of Volume objects

Data disk parameters of a node. A VM can have up to 16 disks attached, while a BMS can only have up to 10 disks attached. The maximum number of disks that can be attached to either a VM or BMS is limited by their respective maximum disk limits. (You can add more data disks to each of your nodes through the CCE console and APIs.) The data disk used by the container runtime and kubelet cannot be detached, or the node will become unavailable. For DeC nodes, the parameter details are the same as those for rootVolume.

storage

Storage object

Disk initialization management parameter.

This parameter is complex to configure. For details, see Attaching Disks to a Node.

NOTE:
  • If a node has both local and EVS disks attached, make sure to not keep the default value for this parameter, or it may result in unexpected disk partitions.
NOTE:
  • If you want to change the value range of a data disk to 20 to 32768, do not use the default value.
NOTE:
  • If you want to use the shared disk space (with the runtime and Kubernetes partitions cancelled), do not retain the default value of this parameter. For details about the shared disk space, see Data Disk Space Allocation.

publicIP

NodePublicIP object

EIP of a node.

NOTE:

This parameter is not supported when you add a node to a node pool.

nodeNicSpec

NodeNicSpec object

NIC of the node

count

Integer

Number of nodes to be created in a batch. The value must be a positive integer greater than or equal to 1 and less than or equal to the defined limit. This parameter can be left blank when it is used for a node pool.

billingMode

Integer

Node billing mode.

  • 0: pay-per-use

taints

Array of Taint objects

You can add taints to created nodes to configure anti-affinity. A maximum of 20 taints can be added. Each taint contains the following parameters:

  • Key: Enter 1 to 63 characters starting and ending with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key.
  • Value: Enter 1 to 63 characters starting and ending with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.
  • Effect: Available options are NoSchedule, PreferNoSchedule, and NoExecute. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.

Example:

"taints": [{
  "key": "status",
  "value": "unavailable",
  "effect": "NoSchedule"
}, {
  "key": "looks",
  "value": "bad",
  "effect": "NoSchedule"
}]

k8sTags

Map<String,String>

Defined in key-value pairs. A maximum of 20 key-value pairs are allowed.

  • Key: Enter 1 to 63 characters starting and ending with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain containing a maximum of 253 characters (such as example.com/my-key) can be prefixed to a key.
  • Value: The value can be left blank or contain 1 to 63 characters that start and end with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.

Example:

"k8sTags": {
  "key": "value"
}

ecsGroupId

String

ECS group ID. If this parameter is configured, nodes will be created in the specified ECS group.

NOTE:

This configuration does not take effect when a node pool is created. To ensure that all nodes in a node pool are in the same ECS group, configure nodeManagement in the node pool.

dedicatedHostId

String

ID of the DeH to which the node is scheduled.

NOTE:

This parameter is not supported when you add a node during node pool creation.

userTags

Array of UserTag objects

Cloud server tag (resource tag). The key of a tag must be unique. The maximum number of custom tags supported by CCE varies depending on regions and cannot exceed 8. When creating a node, you can specify the initial value for this parameter and this field is not returned during query. In node pools, the initial value can be specified in the node template and this field is returned during query. In other scenarios, this field is not returned during query.

NOTE:

A tag key can have a maximum of 36 characters. It can only contain letters, digits, Unicode characters, and special characters (-_).

runtime

Runtime object

Container runtime. Default value:

  • Clusters earlier than v1.25: The default value is docker.
  • Clusters of v1.25 or later: The default container runtime varies depending on the OS. For nodes running EulerOS 2.5, the default container runtime is docker; for nodes running other OSs, the default container runtime is containerd.

initializedConditions

Array of strings

Custom initialization flag, which is left blank by default.

Before CCE nodes are initialized, node.cloudprovider.kubernetes.io/uninitialized is added to the nodes to prevent pods from being scheduled to these nodes. When creating a node, you can configure the initializedConditions parameter to control the taint removal time. By default, the timeout period is not configured.

Example:

  1. Create a node and add parameter "initializedConditions": ["CCEInitial", "CustomedInitial"].
  2. After custom initialization is complete, CCE will call a Kubernetes API (for example, PATCH /v1/nodes/{node_ip}/status) to update the node conditions by adding two labels of types CCEInitial and CustomedInitial and setting the status to True, as shown in the following:
status:
  conditions:
  - type: CCEInitial
    status: 'True'
  - type: CustomedInitial
    status: 'True'
  1. CCE polls status.Conditions of nodes to check whether there are conditions of types CCEInitial and CustomedInitial. If such conditions exist and the status is True, the node initialization is complete and the initialization taint is removed.
  2. initializedConditions allows you to configure a timeout period during node creation. For example, "initializedConditions": ["CCEInitial:15m", "CustomedInitial:15m"] indicates that the timeout period is 15 minutes. After the timeout period is reached, the initialization conditions will be automatically ignored and the initialization taint will be removed when CCE polls the node.
  • The timeout interval in initializedConditions ranges from 1 to 99 seconds.
  • Use only letters and digits. Max. characters: 20.
  • Max. flags: 2.
  • The unit of the timeout period is minute (m).

extendParam

NodeExtendParam object

Extended parameters for creating a node.

hostnameConfig

HostnameConfig object

Kubernetes node name configuration parameter, which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions.

serverEnterpriseProjectID

String

Enterprise project ID of a server. CCE does not support features provided by EPS. This field is used only for synchronizing enterprise project IDs of servers. To create a node or node pool, you can specify an existing enterprise project for it. If this field is left blank, it inherits the enterprise project attributes of the cluster that runs the node or node pool. When updating a node pool, any configuration modifications you made will apply only to new nodes. You need to modify the enterprise projects of existing nodes on the EPS console. If no value is specified during the update, this field will not be updated. If this parameter is left blank, the cluster enterprise project is returned.

Table 33 Login

Parameter

Type

Description

sshKey

String

Name of the key pair used for login.

userPassword

UserPassword object

Password used for node login.

Table 34 UserPassword

Parameter

Type

Description

username

String

Login account. The default value is root.

password

String

Login password. If a username and password are used to create a node, this field is shielded in the response body. A password must meet the following complexity requirements:

  • Contains 8 to 26 characters.
  • Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters !@$%^-_=+[{}]:,./?
  • Cannot contain the username or the username spelled backwards. The password field must be salted during node creation. For details, see Adding a Salt in the password Field When Creating a Node.
Table 35 Volume

Parameter

Type

Description

size

Integer

Disk size, in GiB.

  • System disk: 40 to 1024
  • Value range for data disks: 100 to 32768

volumetype

String

Disk type. For details about possible values, see the description of the root_volume parameter in the API used to create an ECS.

  • SAS: high I/O SAS disk
  • SSD: ultra-high I/O SSD disk
  • SATA: common I/O SATA disk SATA disks have been removed from EVS. You can find them attached only on existing nodes.

extendParam

Map<String,Object>

Extended disk parameters, defined in extendparam in the API used to create an ECS.

cluster_id

String

ID of the storage pool used by the ECS system disk. This field is used only for DeC clusters, which functions as dssPoolID, that is, the ID of the DSS storage pool.

cluster_type

String

Storage class of the cloud server system disk. The value is always dss. This field is used only for DeC clusters.

hw:passthrough

Boolean

  • Pay attention to this field if your ECS is SDI-compliant. If the value of this field is true, the created disk is of SCSI type.
  • If the node pool type is ElasticBMS, this field must be set to true.
  • If a node specification involves both local and EVS disks, configure the disk initialization parameters. For details, see Attaching Disks to a Node.

metadata

VolumeMetadata object

EVS disk encryption information. This field is mandatory only when you need to encrypt the system disk or data disks of the node to be created.

Table 36 VolumeMetadata

Parameter

Type

Description

__system__encrypted

String

Whether the EVS disk is encrypted. The value 0 indicates that the EVS disk is not encrypted, and the value 1 indicates that the EVS disk is encrypted.

If this parameter is not specified, EVS disks will not be encrypted by default.

__system__cmkid

String

CMK ID, which indicates encryption in metadata. This field is used with __system__encrypted.

Table 37 Storage

Parameter

Type

Description

storageSelectors

Array of StorageSelectors objects

Disk selection. Matched disks are managed according to matchLabels and storageType.

storageGroups

Array of StorageGroups objects

A storage group consists of multiple storage devices. It is used to divide storage space.

Table 38 StorageSelectors

Parameter

Type

Description

name

String

Selector name, used as the index of selectorNames in storageGroup. Therefore, the name of each selector must be unique.

storageType

String

Storage type. Only evs (EVS disks) and local (local disks) are supported. The local storage does not support disk selection. All local disks will form a VG, so only one storageSelector of the local type is allowed.

matchLabels

matchLabels object

Matching field of an EVS disk. The value can be size, volumeType, metadataEncrypted, metadataCmkid, or count in DataVolume.

Table 39 matchLabels

Parameter

Type

Description

size

String

Matched disk size. If this parameter is left unspecified, the disk size is not limited. Example: 100

volumeType

String

EVS disk type. SSD, GPSSD, SAS, ESSD, and SATA are supported. If this parameter is left blank, there is no restriction on the disk type.

metadataEncrypted

String

Disk encryption identifier. If this parameter is set to 0, it specifies that the disk is not encrypted. If this parameter is set to 1, it specifies that the disk is encrypted. If this parameter is left blank, there is no restriction on the disk encryption identifier.

metadataCmkid

String

CMK ID of an encrypted disk. The value is a string of 36 bytes. If this parameter is left blank, there is no restriction on the disk key ID.

count

String

Number of disks to be selected. If this parameter is left blank, all disks of this type are selected.

Table 40 StorageGroups

Parameter

Type

Description

name

String

Name of a virtual storage group, which must be unique.

NOTE:
  • If cceManaged is set to true, the name must be set to vgpaas.
  • If the data disk is used as a temporary storage volume, the name must be vg-everest-localvolume-ephemeral.
  • If the data disk is used as a persistent storage volume, the name must be vg-everest-localvolume-persistent.

cceManaged

Boolean

Storage space for Kubernetes and runtime components. Only one group can be set to true. If this parameter is left blank, the default value false is used.

selectorNames

Array of strings

Corresponds to name in storageSelectors. One group can select multiple selectors, but one selector can be selected by only one group.

virtualSpaces

Array of VirtualSpace objects

Detailed management of space configuration in a group.

Table 41 VirtualSpace

Parameter

Type

Description

name

String

Name of a virtualSpace. Options: share, kubernetes, runtime, and user

  • share: shared space configuration (with the runtime and Kubernetes partitions cancelled). lvmConfig needs to be configured.
  • Kubernetes: Kubernetes space configuration. lvmConfig needs to be configured.
  • runtime: runtime space configuration. runtimeConfig needs to be configured.
  • user: user space configuration. lvmConfig needs to be configured.

size

String

Size of a virtualSpace. The value must be an integer in percentage. Example: 90%.

NOTE:

The value ranges from 10 to 90. The sum of percentages of all virtualSpaces in a group cannot exceed 100%.

lvmConfig

LVMConfig object

LVM configuration managements, applicable to the share*, kubernetes, and user spaces. Note that one virtual space supports only one config.

runtimeConfig

RuntimeConfig object

runtime configurations, applicable to the runtime space. Note that one virtual space supports only one config.

Table 42 LVMConfig

Parameter

Type

Description

lvType

String

LVM write mode. linear indicates the linear mode. striped indicates the striped mode, in which multiple disks are used to form a strip to improve disk performance.

path

String

Disk mount path. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed.

NOTE:

Do not leave the path empty or set it to a key OS path such as the root directory. Key OS paths that cannot be specified: /, /home, /home/, /bin, /bin/, /lib, /lib/, /root, /root/, /boot, /boot/, /dev, /dev/, /etc, /etc/, /lost+found, /lost+found/, /mnt, /mnt/, /proc, /proc/,/sbin, /sbin/, /srv, /srv/, /tmp, /tmp/, /var, /var/, /media, /media/, /opt, /opt/, /selinux, /selinux/, /sys, /sys/, /usr, /usr/, /opt/cloud/, /mnt/paas/, /home/paas/, /var/paas/, /var/lib/, /var/script/

Table 43 RuntimeConfig

Parameter

Type

Description

lvType

String

LVM write mode. linear indicates the linear mode. striped indicates the striped mode, in which multiple disks are used to form a strip to improve disk performance.

Table 44 NodePublicIP

Parameter

Type

Description

ids

Array of strings

IDs of existing EIPs. The quantity cannot be greater than the number of nodes to be created.

NOTE:

If ids has been set, you do not need to set count and eip.

count

Integer

Number of EIPs to be dynamically created.

NOTE:

count and eip must be set at the same time.

eip

NodeEIPSpec object

EIP configuration.

NOTE:

This parameter is not supported when creating a node pool.

Table 45 NodeEIPSpec

Parameter

Type

Description

iptype

String

EIP type, specified in publicip.type in the API for assigning an EIP.

bandwidth

NodeBandwidth object

Bandwidth parameters of the EIP

Table 46 NodeBandwidth

Parameter

Type

Description

chargemode

String

Bandwidth billing mode.

  • If this field is not specified, the billing is based on bandwidth.
  • If the field is null, the billing is based on bandwidth.
  • If the field value is traffic, the billing is based on traffic.
  • If the value is out of the preceding options, the cloud server will fail to be created.
NOTE:
  • Billed by bandwidth: The billing will be based on the data transmission rate (in Mbps) of public networks. This billing mode is recommended if your bandwidth usage is higher than 10%.
  • Billed by traffic: The billing is based on the total amount of data (in GB) transmitted over the public network. This mode is available only when you are creating a pay-per-use node. This billing mode is recommended if your bandwidth usage is lower than 10%.

size

Integer

Bandwidth size, specified in bandwidth.size in the API for assigning an EIP.

sharetype

String

Bandwidth sharing type. Value options: PER (exclusive bandwidth)

Table 47 NodeNicSpec

Parameter

Type

Description

primaryNic

NicSpec object

Description of the primary NIC.

extNics

Array of NicSpec objects

Extension NIC

NOTE:

This parameter is not supported when you add a node to a node pool.

Table 48 NicSpec

Parameter

Type

Description

subnetId

String

Network ID of the subnet to which a NIC belongs. If subnetId is not specified when a primary NIC is creating, the cluster subnet will be used. If subnetList is also configured for a node pool, the subnetList field is used for adding subnets to the node pool. When creating an extension NIC, you must specify subnetId.

fixedIps

Array of strings

The IP address of the primary ENI is specified using fixedIps. The number of IP addresses cannot be greater than the number of created nodes. Either fixedIps or ipBlock can be specified. fiexdIps cannot be specified for extension ENIs.

ipBlock

String

CIDR format of the primary NIC IP range. The IP address of the created node falls in this range. fixedIps and ipBlock cannot be specified at the same time.

subnetList

Array of strings

Network ID list of the subnet where the NIC resides. A maximum of 20 subnets can be configured for a node pool.

Table 49 Taint

Parameter

Type

Description

key

String

Key.

value

String

Value.

effect

String

Effect.

Table 50 UserTag

Parameter

Type

Description

key

String

Key of the cloud server label. The value cannot start with CCE- or __type_baremetal.

value

String

Value of the cloud server label.

Table 51 Runtime

Parameter

Type

Description

name

String

Container runtime. Default value:

  • Clusters earlier than v1.25: The default value is docker.
  • Clusters of v1.25 or later: The default container runtime varies depending on the OS. For nodes running EulerOS 2.5, the default container runtime is docker; for nodes running other OSs, the default container runtime is containerd.
Table 52 NodeExtendParam

Parameter

Type

Description

ecs:performancetype

String

ECS flavor types. This field is returned in the response.

maxPods

Integer

Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256.

This limit prevents the node from being overloaded of pods.

The number of pods that can be created on a node is determined by multiple parameters. For details, see Maximum Number of Pods That Can Be Created on a Node.

DockerLVMConfigOverride

String

Docker data disk configuration item. (This parameter has been discarded. Use the storage field instead.) Example default configuration:

"DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear"

By default, if no VD disk is available, an error occurs because the data disk fails to be found. Set diskType based on the actual drive letter type. The following fields are included:

  • userLV (optional): size of the user space, for example, vgpaas/20%VG.
  • userPath (optional): mount path of the user space, for example, /home/wqt-test.
  • diskType: disk type. Currently, only evs, hdd, and ssd are supported.
  • lvType: type of a logic volume. The value can be linear or striped.
  • dockerThinpool: Docker space size, for example, vgpaas/60%VG.
  • kubernetesLV: kubelet space size, for example, vgpaas/20%VG.

dockerBaseSize

Integer

Available disk space of a single container on a node, in GB. This parameter has been discarded. Use containerBaseSize.

If this parameter is left blank or is set to 0, the default value is used. In Device Mapper mode, the default value is 10. In OverlayFS mode, the available space of a single container is not limited by default, and the dockerBaseSize setting takes effect only on nodes running EulerOS in clusters of the new versions.

For details about how to allocate the space for the container runtime, see Data Disk Space Allocation.

When Device Mapper is used, it is recommended that dockerBaseSize be set to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device.

containerBaseSize

Integer

Available disk space of a single container on a node, in GiB.

If this parameter is left blank or is set to 0, the default value is used. In OverlayFS mode, the available space of a single container is not limited by default. In Device Mapper mode, the default value is 10, and the containerBaseSize setting takes effect only on nodes running EulerOS in clusters v1.23.14-r0, v1.25.9-r0, v1.27.6-r0, v1.28.4-r0 or later.

For details about how to allocate the space for the container runtime, see Data Disk Space Allocation.

When Device Mapper is used, it is recommended that containerBaseSize be set to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device. In new versions, the Device Mapper mode is used only by BMSs in the same resource pool and is being discarded.

NOTE:

This parameter cannot be updated when a node pool is being updated.

publicKey

String

Public key of a node.

alpha.cce/preInstall

String

Pre-installation scripts. The total number of characters after transcoding cannot exceed 10240.

NOTE:

The input value must be encoded using Base64. The method is as follows:

echo -n "Content to be encoded" | base64

alpha.cce/postInstall

String

Post-installation scripts. The total number of characters after transcoding cannot exceed 10240.

NOTE:

The input value must be encoded using Base64. The method is as follows:

echo -n "Content to be encoded" | base64

alpha.cce/NodeImageID

String

This parameter is required when a custom image is used to create a BMS node.

chargingMode

Integer

Billing mode of a node. This parameter has been deprecated. Use the billingMode parameter in NodeSpec.

agency_name

String

Name of an agency

An agency is created by a tenant administrator on Identity and Access Management (IAM) to provide temporary credentials for CCE nodes to access cloud servers. This parameter is returned only when it is transferred during node creation.

kubeReservedMem

Integer

Reserved node memory, which is reserved for Kubernetes components.

systemReservedMem

Integer

Reserved node memory, which is reserved for system components.

init-node-password

String

Node password. If this parameter is used as a response parameter, asterisks (*) will be displayed.

Table 53 HostnameConfig

Parameter

Type

Description

type

String

Configuration type of the Kubernetes node name. The default value is privateIp.

  • privateIp: The Kubernetes node is named after its IP address.
  • cceNodeName: The Kubernetes node is named after the CCE node.
NOTE:
  • For a node which is configured using cceNodeName, the name is the same as the Kubernetes node name and the ECS name. The node name cannot be changed. If the ECS name is changed on the ECS console, the node name will retain unchanged after ECS synchronization.
  • For a node which is configured using cceNodeName, to avoid a conflict between Kubernetes nodes, the system automatically adds a suffix to each node name. The suffix is in the format of A hyphen (-) Five random characters. The value of the random characters is a lowercase letter or a digit ranging from 0 to 9.
Table 54 NodeStatus

Parameter

Type

Description

phase

String

Node status, which is the status of a node during its lifecycle (such as installation and uninstallation) or the status of a node in a Kubernetes cluster. Options:

  • Build: The node is being created.
  • Installing: The node is being managed.
  • Upgrading: The node is being upgraded.
  • Active: The node is running properly.
  • Abnormal: The node is abnormal.
  • Deleting: The node is being deleted.
  • Error: The node is faulty.

lastProbeTime

String

Last time when the node status was checked. If the cluster is in the abnormal, frozen, or intermediate state (for example, creating), the node status check may be affected. The node status that takes more than five minutes to check has no reference value.

jobID

String

ID of a creation or deletion job

serverId

String

ID of the underlying ECS or BMS node

privateIP

String

IP address in the private network segment of the primary NIC on the node

privateIPv6IP

String

IPv6 address in the private network segment of the primary NIC on the node

publicIP

String

Node EIP. If the ECS data is not synchronized in real time, you can click Sync Node Data on the console to manually update the data.

deleteStatus

DeleteStatus object

Resource status during resource deletion.

Table 55 DeleteStatus

Parameter

Type

Description

previous_total

Integer

Total number of existing cluster resource records when the cluster is deleted.

current_total

Integer

Latest number of resource records, which is generated based on the current cluster resource records.

updated

Integer

Total number of resource records updated when the cluster is deleted.

added

Integer

Total number of resource records updated when the cluster is deleted.

deleted

Integer

Total number of resource records deleted when the cluster is deleted.

Example Requests

  • Create a node with the flavor of 2 vCPUs and 4 GiB of memory. The node runs EulerOS 2.5 for Docker containers. The sizes of the system disk and data disk of the node are 50 GB and 100 GB, respectively. Both the disks are of the high I/O type.
    POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes
    
    {
      "kind" : "Node",
      "apiVersion" : "v3",
      "metadata" : {
        "name" : "test-83790"
      },
      "spec" : {
        "flavor" : "c7.large.2",
        "az" : "******",
        "os" : "EulerOS 2.5",
        "dataVolumes" : [ {
          "size" : 100,
          "volumetype" : "SAS"
        } ],
        "billingMode" : 0,
        "extendParam" : {
          "maxPods" : 110
        },
        "nodeNicSpec" : {
          "primaryNic" : {
            "subnetId" : "ca964acf-8468-4735-8229-97940ef6c881"
          }
        },
        "rootVolume" : {
          "size" : 50,
          "volumetype" : "SAS"
        },
        "runtime" : {
          "name" : "docker"
        },
        "login" : {
          "sshKey" : "KeyPair-001"
        },
        "storage" : {
          "storageSelectors" : [ {
            "name" : "cceUse",
            "storageType" : "evs",
            "matchLabels" : {
              "size" : "100",
              "volumeType" : "SAS",
              "count" : "1"
            }
          } ],
          "storageGroups" : [ {
            "name" : "vgpaas",
            "selectorNames" : [ "cceUse" ],
            "cceManaged" : true,
            "virtualSpaces" : [ {
              "name" : "runtime",
              "size" : "90%"
            }, {
              "name" : "kubernetes",
              "size" : "10%"
            } ]
          } ]
        },
        "count" : 1
      }
    }
  • Create a node with the flavor of 2 vCPUs and 4 GiB of memory. The node uses Docker. The sizes of the system disk and data disk of the node are 50 GB and 100 GB, respectively. The data disk uses the shared disk space mode.
    POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes
    
    {
      "kind" : "Node",
      "apiVersion" : "v3",
      "metadata" : {
        "name" : "test-66909"
      },
      "spec" : {
        "flavor" : "c7.large.2",
        "az" : "******",
        "os" : ,
        "dataVolumes" : [ {
          "size" : 100,
          "volumetype" : "SAS"
        } ],
        "billingMode" : 0,
        "extendParam" : {
          "maxPods" : 110
        },
        "nodeNicSpec" : {
          "primaryNic" : {
            "subnetId" : "ca964acf-8468-4735-8229-97940ef6c881"
          }
        },
        "rootVolume" : {
          "size" : 50,
          "volumetype" : "SAS"
        },
        "runtime" : {
          "name" : "docker"
        },
        "login" : {
          "sshKey" : "KeyPair-001"
        },
        "storage" : {
          "storageSelectors" : [ {
            "name" : "cceUse",
            "storageType" : "evs",
            "matchLabels" : {
              "size" : "100",
              "volumeType" : "SAS",
              "count" : "1"
            }
          } ],
          "storageGroups" : [ {
            "name" : "vgpaas",
            "selectorNames" : [ "cceUse" ],
            "cceManaged" : true,
            "virtualSpaces" : [ {
              "name" : "share",
              "size" : "100%"
            } ]
          } ]
        },
        "count" : 1
      }
    }

Example Responses

Status code: 201

The job for creating a node in a specified cluster is successfully delivered.

{
  "kind" : "Node",
  "apiVersion" : "v3",
  "metadata" : {
    "name" : "test-83790",
    "uid" : "5ecfddfe-87db-11ec-b5e5-0255ac101514",
    "annotations" : {
      "jobid" : "5ec1518c-87db-11ec-b5e5-0255ac101514",
      "resourceJobId" : "5ed0d692-87db-11ec-b5e5-0255ac101514"
    }
  },
  "spec" : {
    "flavor" : "c7.large.2",
    "az" : "******",
    "os" : "EulerOS 2.5",
    "login" : {
      "sshKey" : "KeyPair-001"
    },
    "rootVolume" : {
      "volumetype" : "SAS",
      "size" : 50
    },
    "dataVolumes" : [ {
      "volumetype" : "SAS",
      "size" : 100
    } ],
    "storage" : {
      "storageSelectors" : [ {
        "name" : "cceUse",
        "storageType" : "evs",
        "matchLabels" : {
          "count" : "1",
          "size" : "100",
          "volumeType" : "SAS"
        }
      } ],
      "storageGroups" : [ {
        "name" : "vgpaas",
        "cceManaged" : true,
        "selectorNames" : [ "cceUse" ],
        "virtualSpaces" : [ {
          "name" : "runtime",
          "size" : "90%"
        }, {
          "name" : "kubernetes",
          "size" : "10%"
        } ]
      } ]
    },
    "publicIP" : {
      "eip" : {
        "bandwidth" : { }
      }
    },
    "nodeNicSpec" : {
      "primaryNic" : {
        "subnetId" : "ca964acf-8468-4735-8229-97940ef6c881"
      }
    },
    "count" : 1,
    "billingMode" : 0,
    "runtime" : {
      "name" : "docker"
    },
    "extendParam" : {
      "chargingMode" : 0,
      "ecs:performancetype" : "computingv3",
      "init-node-password" : "******",
      "maxPods" : 110,
      "publicKey" : ""
    }
  },
  "status" : {
    "jobID" : "5ec1518c-87db-11ec-b5e5-0255ac101514"
  }
}

Status Codes

Status Code

Description

201

The job for creating a node in a specified cluster is successfully delivered.

Error Codes

See Error Codes.