:original_name: cce_02_0242.html .. _cce_02_0242: Creating a Node =============== Function -------- This API is used to create a node in a specified cluster. URI --- POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes :ref:`Table 1 ` describes the parameters of the API. .. _cce_02_0242__table2027961241820: .. table:: **Table 1** Parameter description +------------+-----------+-------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Description | +============+===========+===============================================================================================================================+ | project_id | Yes | Project ID. For details about how to obtain the project ID, see :ref:`How to Obtain Parameters in the API URI `. | +------------+-----------+-------------------------------------------------------------------------------------------------------------------------------+ | cluster_id | Yes | Cluster ID. For details about how to obtain the cluster ID, see :ref:`How to Obtain Parameters in the API URI `. | +------------+-----------+-------------------------------------------------------------------------------------------------------------------------------+ Request ------- **Request parameters**: :ref:`Table 2 ` and :ref:`Table 3 ` describe the request parameters. .. _cce_02_0242__table2582312171119: .. table:: **Table 2** Parameters in the request header +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Description | +=======================+=======================+===============================================================================================================================================================================================================================================================================+ | Content-Type | Yes | Message body type (format). Possible values: | | | | | | | | - application/json;charset=utf-8 | | | | - application/json | +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | X-Auth-Token | Yes | 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 on how to obtain a user token, see :ref:`API Usage Guidelines `. | +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table34052983203655: .. table:: **Table 3** Parameters in the request body +------------+-----------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | 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 | Yes | :ref:`metadata ` object | Node's metadata, which is a collection of attributes. | +------------+-----------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | spec | Yes | :ref:`spec ` object | Detailed description of the node targeted by this API. CCE creates or updates objects by defining or updating its spec. | +------------+-----------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table65041257514: .. table:: **Table 4** Data structure of the **metadata** field +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+=================================================================================================================================================================================================================+ | name | No | String | Node name. | | | | | | | | | | .. note:: | | | | | | | | | | Enter 0 to 56 characters starting with a letter and not ending with a hyphen (-). Only lowercase letters, digits, and hyphens (-) are allowed. | | | | | | | | | | If no node name is specified, the system automatically generates a node name in the format of **Cluster Name-****\***. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | labels | No | Object | 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: | | | | | | | | | | .. code-block:: | | | | | | | | | | "labels": { | | | | | "key" : "value" | | | | | } | | | | | | | | | | .. note:: | | | | | | | | | | Users can not use this field to define the native Kubernetes labels. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | annotations | No | Object | CCE node annotation in key-value pair format (not the native Kubernetes annotations). | | | | | | | | | | Example: | | | | | | | | | | .. code-block:: | | | | | | | | | | "annotations": { | | | | | "key1" : "value1", | | | | | "key2" : "value2" | | | | | } | | | | | | | | | | .. note:: | | | | | | | | | | - Users can not use this field to define the native Kubernetes labels. | | | | | - **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. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table3150105216225: .. table:: **Table 5** Data structure of the **spec** field +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+===================================================================================+====================================================================================================================================================================================================================================================================================+ | flavor | Yes | String | Node specifications. For details, see the description of the **flavorRef** parameter in `Creating an ECS `__. | | | | | | | | | | .. note:: | | | | | | | | | | - When adding a BMS node, check whether the flavor of the node to be added supports local disks. If local disks are not supported, add at least one 100 GB EVS disk. | | | | | - Nodes must have 2-core or higher CPU, 4 GB or larger memory. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | az | Yes | String | AZ of the node. For details, see the description of the **availability_zone** parameter in `Creating an ECS `__. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | os | No | String | Node OS. | | | | | | | | | | - Nodes in clusters of Kubernetes v1.11 or earlier support EulerOS 2.2. | | | | | - Nodes in clusters of Kubernetes v1.13 or v1.15 support EulerOS 2.5. | | | | | - Nodes in clusters of Kubernetes v1.17 support EulerOS 2.5 and CentOS 7.7. | | | | | - Nodes in clusters of Kubernetes v1.19, v1.21 or v1.23 support EulerOS 2.5, EulerOS 2.9 and CentOS 7.7. | | | | | - Nodes using **kata** runtime in CCE Turbo cluster support EulerOS 2.9. | | | | | | | | | | .. note:: | | | | | | | | | | If the **alpha.cce/NodeImageID** parameter in **extendParam** is specified during node creation, you do not need to set this field. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dedicatedHostId | No | String | ID of the dedicated host to which nodes will be scheduled. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | login | Yes | :ref:`login ` object | Node login mode, which can be key pair or password. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | rootVolume | Yes | :ref:`Volume ` object | System disk parameters of the node. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dataVolumes | Yes | Array of :ref:`Volume ` object | Data disk parameters of the node. Currently, you can add the second data disk for your node on the CCE console. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | storage | No | :ref:`Storage ` object | Disk initialization management parameter. | | | | | | | | | | This parameter is complex to configure. For details, see :ref:`Attaching Disks to a Node `. | | | | | | | | | | If this parameter retains its default, disks are managed based on the DockerLVMConfigOverride (discarded) parameter in extendParam. This parameter is supported by clusters of version 1.15.11 and later. | | | | | | | | | | .. note:: | | | | | | | | | | If a node specification involves local disks and EVS disks at the same time, do not retain the default value of this parameter to prevent unexpected disk partitions. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | publicIP | No | :ref:`publicIP ` object | EIP used by the node to access public networks. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | billingMode | No | Integer | Billing mode of a node. | | | | | | | | | | .. note:: | | | | | | | | | | This field is not supported for the current version. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | count | Yes | 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. | | | | | | | | | | .. note:: | | | | | | | | | | This fielder can be set to **0** for a node pool. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | nodeNicSpec | No | :ref:`nodeNicSpec ` object | Description about the node NIC. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | extendParam | No | :ref:`extendParam ` object | Extended parameter. Format: Key-value pair. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | userTags | No | Object | Tag of a VM. | | | | | | | | | | The format is key-value pair. The number of key-value pairs cannot exceed 20. | | | | | | | | | | - **Key**: Only letters, digits, hyphens (-), underscores (_), and at signs (@) are supported. | | | | | - **Value**: Only letters, digits, hyphens (-), underscores (_), and at signs (@) are supported. | | | | | | | | | | Example: | | | | | | | | | | .. code-block:: | | | | | | | | | | "userTags": [ | | | | | { | | | | | "key": "tag1", | | | | | "value": "aaaa" | | | | | }, | | | | | { | | | | | "key": "tag2", | | | | | "value": "bbbb" | | | | | } | | | | | ] | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | k8sTags | No | Object | Tag of a Kubernetes node. | | | | | | | | | | The format is key-value pair. The number of key-value pairs cannot exceed 20. | | | | | | | | | | - **Key**: Enter 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key and contain a maximum of 253 characters. Example DNS subdomain: example.com/my-key | | | | | - **Value**: The value can be left blank or a string of 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed in the character string. | | | | | | | | | | Example: | | | | | | | | | | .. code-block:: | | | | | | | | | | "k8sTags": { | | | | | "key": "value" | | | | | } | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | taints | No | Object | You can add taints to created nodes to configure anti-affinity. 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 start with a letter or digit and can contain a maximum of 63 characters, including letters, digits, hyphens (-), underscores (_), and periods (.). | | | | | - **Effect**: Available options are **NoSchedule**, **PreferNoSchedule**, and **NoExecute**. | | | | | | | | | | Example: | | | | | | | | | | .. code-block:: | | | | | | | | | | "taints": [{ | | | | | "key": "status", | | | | | "value": "unavailable", | | | | | "effect": "NoSchedule" | | | | | }, { | | | | | "key": "looks", | | | | | "value": "bad", | | | | | "effect": "NoSchedule" | | | | | }] | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ecsGroupId | No | String | ECS group ID. If this parameter is specified, the node is created in the specified ECS group. | | | | | | | | | | .. note:: | | | | | | | | | | This parameter is not supported when you add a node to a node pool or use CCE Turbo cluster. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dedicatedHostId | No | String | ID of the DeH host. If this parameter is specified, the node is scheduled to its own DeH host. | | | | | | | | | | .. note:: | | | | | | | | | | This parameter is not supported when you add a node to a node pool. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | offloadNode | No | Boolean | Whether the node belongs to a CCE Turbo cluster. | | | | | | | | | | .. note:: | | | | | | | | | | This parameter is not supported when you add a node to a node pool. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | faultDomain | No | String | Cloud server fault domain. The node is created in the fault domain specified by this parameter. | | | | | | | | | | .. note:: | | | | | | | | | | You must specify the ECS to which the fault domain policy applies and enable the fault domain feature. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | runtime | No | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table322873620312: .. table:: **Table 6** Data structure of the nodeNicSpec field +------------+-----------+----------------------------------------------------------------+------------------------------------+ | Parameter | Mandatory | Type | Description | +============+===========+================================================================+====================================+ | primaryNic | No | :ref:`primaryNic ` object | Description about the primary NIC. | +------------+-----------+----------------------------------------------------------------+------------------------------------+ | extNics | No | Array of :ref:`extNics ` objects | Extension NIC. | +------------+-----------+----------------------------------------------------------------+------------------------------------+ .. _cce_02_0242__request_nicspec: .. table:: **Table 7** Data structure of the primaryNic/extNics field +-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +===========+===========+==================+===================================================================================================================================================================================================================+ | subnetId | No | String | Network ID of the subnet to which the NIC belongs. | +-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | fixedIps | No | Array of strings | The IP address of the primary NIC is specified by **fixedIps**. The number of IP addresses cannot be greater than the number of created nodes. **fixedIps** and **ipBlock** cannot be specified at the same time. | +-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ipBlock | No | String | CIDR format of the IP address segment. The IP address of the created node falls in this IP address segment. **fixedIps** and **ipBlock** cannot be specified at the same time. | +-----------+-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table153332427337: .. table:: **Table 8** Data structure of the extendParam field +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=========================+=================+=================+========================================================================================================================================================+ | maxPods | No | Integer | Maximum number of pods on the node. | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | agency_name | No | String | Specifies the IAM agency name. | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | dockerBaseSize | No | Integer | Available disk space of a single Docker container on the node using the device mapper. | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | alpha.cce/preInstall | No | String | Script required before the installation. | | | | | | | | | | .. note:: | | | | | | | | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | alpha.cce/postInstall | No | String | Script required after the installation. | | | | | | | | | | .. note:: | | | | | | | | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | alpha.cce/NodeImageID | No | String | Mandatory if a custom image is used in creating a bare metal node. | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | DockerLVMConfigOverride | No | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.)The following is an example configuration: | | | | | | | | | | .. code-block:: | | | | | | | | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | | | | | | | | | | In this example: | | | | | | | | | | - **userLV**: size of the user space, for example, **vgpaas/20%VG**. | | | | | - **userPath**: mount path of the user space, for example, **/home/wqt-test**. | | | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | | | | | - **lvType**: type of a logic volume. Currently, 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**. | +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table10946114617286: .. table:: **Table 9** Data structure of the **login** field +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+==================================================================================================================================+ | sshKey | No | String | Name of the key pair used for node login. For details on how to create a key pair, see :ref:`Creating a Key Pair `. | +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------+ | userPassword | No | String | Password used for node login. | | | | | | | | | | .. note:: | | | | | | | | | | This field is not supported for the current version. | +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table1359314517: .. table:: **Table 10** Data structure of the **Volume** field +-----------------+-----------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=====================================================================+============================================================================================================================================================================================+ | volumetype | No | String | Disk type. For details, see the description of **root_volume** in `Creating an ECS `__. | | | | | | | | | | - **SATA**: common I/O disk type. | | | | | - **SAS**: high I/O disk type. | | | | | - **SSD**: ultra-high I/O disk type. | +-----------------+-----------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | size | No | Integer | Specifies the system disk size, in GB. The value ranges from 40 to 1024. | +-----------------+-----------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | extendParam | No | Map | Disk extension parameter. For details, see the description of the extendparam parameter in `Creating an ECS `__. | +-----------------+-----------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 the SCSI type. | | | | | - If the node pool type is **ElasticBMS**, this field must be set to **true**. | +-----------------+-----------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | metadata | No | :ref:`dataVolumeMetadata ` object | Data disk encryption information. This parameter is mandatory only when the data disk of the node to be created needs to be encrypted. | | | | | | | | | | If data disks are created using a data disk image, this parameter cannot be used. | +-----------------+-----------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table15849123210415: .. table:: **Table 11** Data structure of the dataVolumeMetadata field +----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +======================+=================+=================+==================================================================================================================================================================+ | \__system__encrypted | No | String | Whether an EVS disk is encrypted. | | | | | | | | | | - **'0'**: not encrypted | | | | | - **'1'**: encrypted | | | | | | | | | | If this parameter is not specified, EVS disks will not be encrypted by default. | +----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | \__system__cmkid | Yes | String | CMK ID used for encryption. This parameter is used with **\__system__encrypted**. | | | | | | | | | | .. note:: | | | | | | | | | | You can obtain the ID through HTTPS requests. For details, see `Querying the List of CMKs `__. | +----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table139179586343: .. table:: **Table 12** Data structure of the **publicIP** field +-----------------+-----------------+----------------------------------------------------+---------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+====================================================+=====================================================================+ | ids | No | Array of strings | List of IDs of the existing EIPs. | | | | | | | | | | .. important:: | | | | | | | | | | NOTICE: | | | | | If **ids** is set, you do not need to set **count** and **eip**. | +-----------------+-----------------+----------------------------------------------------+---------------------------------------------------------------------+ | count | No | Integer | Number of EIPs to be dynamically created. | | | | | | | | | | .. important:: | | | | | | | | | | NOTICE: | | | | | The **count** and **eip** parameters must be set simultaneously. | +-----------------+-----------------+----------------------------------------------------+---------------------------------------------------------------------+ | eip | No | :ref:`eip ` object | EIP. | | | | | | | | | | .. important:: | | | | | | | | | | NOTICE: | | | | | The **count** and **eip** parameters must be set simultaneously. | +-----------------+-----------------+----------------------------------------------------+---------------------------------------------------------------------+ .. note:: If no EIP has been created, configure **count** and **eip**. The system will automatically create EIPs based on **count** and **eip**. .. _cce_02_0242__table135065714419: .. table:: **Table 13** Data structure of the **eip** field +-----------+-----------+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +===========+===========+============================================================+=================================================================================================================================================================================================================+ | iptype | Yes | String | EIP type. For details, see the description of the **iptype** parameter in the **eip** field in `Data Structure for Creating ECSs `__. | +-----------+-----------+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | bandwidth | Yes | :ref:`bandwidth ` object | Bandwidth parameters of the EIP. | +-----------+-----------+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table16381121974213: .. table:: **Table 14** Data structure of the **bandwidth** field +------------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +============+===========+=========+=======================================================================================================================================================================================================================================+ | chargemode | No | String | The value is **traffic**, indicating that the billing is based on traffic. | +------------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | size | Yes | Integer | Bandwidth size. For details, see the description of the **size** parameter in the **bandwidth** field in `Data Structure for Creating ECSs `__. | +------------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sharetype | Yes | String | Shared bandwidth type. For details, see the description of the **sharetype** parameter in the **bandwidth** field in `Data Structure for Creating ECSs `__. | +------------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table163721555105015: .. table:: **Table 15** Runtime +-----------------+-----------------+-----------------+-----------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+=====================================================+ | name | No | String | Container runtime. The default value is **docker**. | | | | | | | | | | Enumeration values: | | | | | | | | | | - docker | | | | | - containerd | +-----------------+-----------------+-----------------+-----------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_storage: .. table:: **Table 16** Storage +------------------+-----------+---------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +==================+===========+===============================================================================================================+=============================================================================================+ | storageSelectors | Yes | Array of :ref:`StorageSelectors ` objects | Disk selection. Matched disks are managed according to **matchLabels** and **storageType**. | +------------------+-----------+---------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | storageGroups | Yes | Array of :ref:`StorageGroups ` objects | A storage group consists of multiple storage devices. It is used to divide storage space. | +------------------+-----------+---------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_storageselectors: .. table:: **Table 17** 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 | Specifies the storage type. Currently, only **evs** (EVS volumes) and **local** (local volumes) are supported. The local storage does not support disk selection. All local disks will form a VG. Therefore, only one storageSelector of the local type is allowed. | +-------------+-----------+-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | matchLabels | No | :ref:`matchLabels ` object | Matching field of an EVS volume. The **size**, **volumeType**, **metadataEncrypted**, **metadataCmkid** and **count** fields are supported. | +-------------+-----------+-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_matchlabels: .. table:: **Table 18** 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. | +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ | metadataEncrypted | No | String | Disk encryption identifier. **0** indicates that the disk is not encrypted, and **1** indicates that the disk is encrypted. | +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ | metadataCmkid | No | String | Customer master key ID of an encrypted disk. The value is a 36-byte string. | +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ | count | No | String | Number of disks to be selected. If this parameter is left blank, all disks of this type are selected. | +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_storagegroups: .. table:: **Table 19** StorageGroups +---------------+-----------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +===============+===========+=======================================================================================================+===================================================================================================================================================================+ | name | Yes | String | Name of a virtual storage group, which must be unique. | +---------------+-----------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 | This parameter corresponds to **name** in **storageSelectors**. A group can match multiple selectors, but a selector can match only one group. | +---------------+-----------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | virtualSpaces | Yes | Array of :ref:`VirtualSpace ` objects | Detailed management of space configuration in a group. | +---------------+-----------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_virtualspace: .. table:: **Table 20** VirtualSpace +-----------------+-----------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+===============================================================================================+=============================================================================================================================+ | name | Yes | String | Name of a virtualSpace. | | | | | | | | | | - **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 sum of the percentages of all virtualSpaces in a group cannot exceed 100%. | +-----------------+-----------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | lvmConfig | No | :ref:`LVMConfig ` object | LVM configurations, applicable to **kubernetes** and **user** spaces. Note that one virtual space supports only one config. | +-----------------+-----------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | runtimeConfig | No | :ref:`RuntimeConfig ` object | runtime configurations, applicable to the **runtime** space. Note that one virtual space supports only one config. | +-----------------+-----------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_lvmconfig: .. table:: **Table 21** 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 | Path to which the disk is attached. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed. | +-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__en-us_topic_0000001417516392_request_runtimeconfig: .. table:: **Table 22** 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. | +-----------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Example request**: CCE cluster: .. code-block:: { "kind": "Node", "apiVersion": "v3", "metadata": { "name": "myhost", "labels": { "foo": "bar" }, "annotations": { "annotation1": "abc" } }, "spec": { "flavor": "c4.large.2", "az": "eu-de-01", "login": { "sshKey": "Keypair-demo" }, "rootVolume": { "size": 40, "volumetype": "SAS" }, "dataVolumes" : [ { "size" : 100, "volumetype" : "SAS" } ], "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%" } ] } ] }, "userTags": [ { "key": "tag1", "value": "aaaa" }, { "key": "tag2", "value": "bbbb" } ], "k8sTags": { "label-test": "test" }, "publicIP": { "count": 2, "eip": { "iptype": "5_bgp", "bandwidth": { "chargemode": "traffic", "size": 10, "sharetype": "PER" } } }, "count": 2, "nodeNicSpec": { "primaryNic": { "subnetId": "bbfc0a20-d66c-4f36-b4c1-265d669b8c62" } }, "extendParam": { "alpha.cce/postInstall": "IyEvYml******C50eHQ=" } } } CCE Turbo cluster: .. code-block:: { "kind": "Node", "apiversion": "v3", "metadata": { "name": "turbo-cluster-node" }, "spec": { "flavor": "cce.c4.22xlarge.4.physical.129nic", "az": "eu-de-01", "login": { "sshKey": "id_rsa" }, "rootVolume": { "size": 40, "volumetype": "SAS", "hw:passthrough": true }, "dataVolumes": [ { "size": 100, "volumetype": "SAS", "hw:passthrough": true } ], "count": 1, "runtime": { "name": "containerd" }, "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%" } ] } ] }, "extendParam": { "alpha.cce/NodeImageID":"0fea78c3-1b31-4653-8859-ac151ccadcd4" } } } Response -------- **Response parameters**: :ref:`Table 23 ` describes the response parameters. .. _cce_02_0242__en-us_topic_0079616779_en-us_topic_0079614912_ref458774242: .. table:: **Table 23** Response 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 | :ref:`metadata ` object | Node's metadata, which is a collection of attributes. | +------------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | spec | :ref:`spec ` object | Detailed description of the node targeted by this API. CCE creates or updates objects by defining or updating its spec. | +------------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | status | :ref:`status ` object | Node status and jobID of the node creation job. | +------------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table0360745335: .. table:: **Table 24** Data structure of the **metadata** field +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+=================================================================================================================================================================================================================+ | name | String | Node name. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | uid | String | Node ID. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | labels | Object | 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: | | | | | | | | .. code-block:: | | | | | | | | "labels": { | | | | "key" : "value" | | | | } | | | | | | | | .. note:: | | | | | | | | Users can not use this field to define the native Kubernetes labels. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | annotations | Object | CCE node annotation in key-value pair format (not the native Kubernetes annotations). | | | | | | | | Example: | | | | | | | | .. code-block:: | | | | | | | | "annotations": { | | | | "key1" : "value1", | | | | "key2" : "value2" | | | | } | | | | | | | | .. note:: | | | | | | | | - Users can not use this field to define the native Kubernetes labels. | | | | - **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. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table13949117115810: .. table:: **Table 25** Data structure of the **spec** field +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+==============================================================+====================================================================================================================================================================================================================================================================================+ | flavor | String | Node specifications. For details, see the description of the **flavorRef** parameter in `Creating an ECS `__. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | az | String | AZ of the node. For details, see the description of the **availability_zone** parameter in `Creating an ECS `__. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | os | String | Node OS. | | | | | | | | - Nodes in clusters of Kubernetes v1.11 or earlier support EulerOS 2.2. | | | | - Nodes in clusters of Kubernetes v1.13 or v1.15 support EulerOS 2.5. | | | | - Nodes in clusters of Kubernetes v1.17 support EulerOS 2.5 and CentOS 7.7. | | | | - Nodes in clusters of Kubernetes v1.19, v1.21 or v1.23 support EulerOS 2.5, EulerOS 2.9 and CentOS 7.7. | | | | - Nodes using **kata** runtime in CCE Turbo cluster support EulerOS 2.9. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | login | :ref:`login ` object | Node login mode, which can only be key pair. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | rootVolume | :ref:`Volume ` object | System disk parameters of the node. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dataVolumes | Array of :ref:`Volume ` object | Data disk parameters of the node. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | storage | :ref:`Storage ` object | Disk initialization management parameter. | | | | | | | | This parameter is complex to configure. For details, see :ref:`Attaching Disks to a Node `. | | | | | | | | If this parameter retains its default, disks are managed based on the DockerLVMConfigOverride (discarded) parameter in extendParam. This parameter is supported by clusters of version 1.15.11 and later. | | | | | | | | .. note:: | | | | | | | | If a node specification involves local disks and EVS disks at the same time, do not retain the default value of this parameter to prevent unexpected disk partitions. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | publicIP | :ref:`publicIP ` object | EIP parameters of a node. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | nodeNicSpec | :ref:`nodeNicSpec ` object | Description about the node NIC. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | count | Integer | Number of nodes to be created in a batch. The value must be a positive integer greater than or equal to 1. | | | | | | | | .. note:: | | | | | | | | This parameter can be set to **0** for a node pool. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | billingMode | Integer | Billing mode of a node. | | | | | | | | .. note:: | | | | | | | | This field is not supported for the current version. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | userTags | Object | The format is key-value pair. | | | | | | | | It is recommended that you use TMS's predefined tag function to add the same tag to different cloud resources. | | | | | | | | - The tag **key** can consist of only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and Unicode characters. | | | | - The tag **value** can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and at signs (@). | | | | | | | | Example: | | | | | | | | .. code-block:: | | | | | | | | "userTags": [ | | | | { | | | | "key": "tag1", | | | | "value": "aaaa" | | | | }, { | | | | "key": "tag2", | | | | "value": "bbbb" | | | | }] | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | k8sTags | Object | The format is key-value pair. The number of key-value pairs cannot exceed 20. | | | | | | | | - **Key**: Enter 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key and contain a maximum of 253 characters. Example DNS subdomain: example.com/my-key | | | | - **Value**: The value can be left blank or a string of 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed in the character string. | | | | | | | | .. note:: | | | | | | | | If a node is created using a node pool, a label whose key is **cce.cloud.com/cce-nodepool** is automatically added to the node, and the label value is the node name. | | | | | | | | Example: | | | | | | | | .. code-block:: | | | | | | | | "k8sTags": { | | | | "key": "value" | | | | } | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | taints | Object | You can add taints to created nodes to configure anti-affinity. 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 start with a letter or digit and can contain a maximum of 63 characters, including letters, digits, hyphens (-), underscores (_), and periods (.). | | | | - **Effect**: Available options are **NoSchedule**, **PreferNoSchedule**, and **NoExecute**. | | | | | | | | Example: | | | | | | | | .. code-block:: | | | | | | | | "taints": [{ | | | | "key": "status", | | | | "value": "unavailable", | | | | "effect": "NoSchedule" | | | | }, { | | | | "key": "looks", | | | | "value": "bad", | | | | "effect": "NoSchedule" | | | | }] | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ecsGroupId | String | ECS group ID. If this parameter is specified, the node is created in the specified ECS group. | | | | | | | | .. note:: | | | | | | | | This parameter is not supported when you add a node to a node pool or use CCE Turbo cluster. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dedicatedHostId | String | ID of the DeH host. If this parameter is specified, the node is scheduled to its own DeH host. | | | | | | | | .. note:: | | | | | | | | This parameter is not supported when you add a node to a node pool. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | offloadNode | Boolean | Whether the node belongs to a CCE Turbo cluster. | | | | | | | | .. note:: | | | | | | | | This parameter is not supported when you add a node to a node pool. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | faultDomain | String | Cloud server fault domain. The node is created in the fault domain specified by this parameter. | | | | | | | | .. note:: | | | | | | | | You must specify the ECS to which the fault domain policy applies and enable the fault domain feature. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | extendParam | :ref:`extendParam ` object | Extended parameter. Format: Key-value pair. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | runtime | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table162751117166: .. table:: **Table 26** Data structure of the nodeNicSpec field +------------+------------------------------------------------------------------+------------------------------------+ | Parameter | Type | Description | +============+==================================================================+====================================+ | primaryNic | :ref:`primaryNic ` object | Description about the primary NIC. | +------------+------------------------------------------------------------------+------------------------------------+ | extNics | Array of :ref:`extNics ` objects | Extension NIC. | +------------+------------------------------------------------------------------+------------------------------------+ .. _cce_02_0242__table614985275016: .. table:: **Table 27** Data structure of the primaryNic/extNics field +-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +===========+==================+===================================================================================================================================================================================================================+ | subnetId | String | Network ID of the subnet to which the NIC belongs. | +-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | fixedIps | Array of strings | The IP address of the primary NIC is specified by **fixedIps**. The number of IP addresses cannot be greater than the number of created nodes. **fixedIps** and **ipBlock** cannot be specified at the same time. | +-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ipBlock | String | CIDR format of the IP address segment. The IP address of the created node falls in this IP address segment. **fixedIps** and **ipBlock** cannot be specified at the same time. | +-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table2039318361484: .. table:: **Table 28** Data structure of the **extendParam** field +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=========================+=======================+==========================================================================================================================================================+ | chargingMode | Integer | Billing mode of a node. | | | | | | | | .. note:: | | | | | | | | This field is not supported for the current version. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | ecs:performancetype | String | Type of the ECS specifications. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | orderID | String | Order ID. | | | | | | | | .. note:: | | | | | | | | This field is not supported for the current version. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | productID | String | Product ID. | | | | | | | | .. note:: | | | | | | | | This field is not supported for the current version. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | publicKey | String | Key pair used to log in to the node. Used when creating a key pair. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | maxPods | Integer | Maximum number of pods on the node. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | dockerBaseSize | Integer | Available disk space of a single Docker container on the node using the device mapper. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | agency_name | String | Specifies the IAM agency name. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | DockerLVMConfigOverride | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.) The following is the default configuration: | | | | | | | | .. code-block:: | | | | | | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | | | | | | | | The configuration contains the following fields: | | | | | | | | - **userLV**: size of the user space, for example: **vgpaas/20%VG**. | | | | - **userPath**: mount path of the user space, for example: **/home/wqt-test**. | | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | | | | - **dockerThinpool**: Docker disk space, for example: **vgpaas/60%VG**. | | | | - **kubernetesLV**: kubelet size, for example: **vgpaas/20%VG**. | +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table9637161310338: .. table:: **Table 29** Data structure of the **status** field +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+==========================================================================================================================================+ | jobID | String | ID of the node creation job. You can :ref:`query job progress ` by job ID to keep updated on node creation progress. | +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | phase | String | Node status. | | | | | | | | - **Build**: The VM that hosts the node is being created. | | | | - **Active**: The node is ready for use. | | | | - **Abnormal**: The node is not ready for use. | | | | - **Deleting**: The node is being deleted. | | | | - **Installing**: The node is being installed. | | | | - **Upgrading**: The node is being upgraded. | +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | serverId | String | ID of the underlying ECS 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. | +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | privateIP | String | IP address in the private network segment of the primary NIC on the node. | +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table483064395515: .. table:: **Table 30** Runtime +-----------------------+-----------------------+-----------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+=====================================================+ | name | String | Container runtime. The default value is **docker**. | | | | | | | | Enumeration values: | | | | | | | | - docker | | | | - containerd | +-----------------------+-----------------------+-----------------------------------------------------+ .. _cce_02_0242__response_storage: .. table:: **Table 31** Storage +------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +==================+===================================================================================+=============================================================================================+ | storageSelectors | Array of :ref:`StorageSelectors ` objects | Disk selection. Matched disks are managed according to **matchLabels** and **storageType**. | +------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | storageGroups | Array of :ref:`StorageGroups ` objects | A storage group consists of multiple storage devices. It is used to divide storage space. | +------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ .. _cce_02_0242__response_storageselectors: .. table:: **Table 32** 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 | Specifies the storage type. Currently, only **evs** (EVS volumes) and **local** (local volumes) are supported. The local storage does not support disk selection. All local disks will form a VG. Therefore, only one storageSelector of the local type is allowed. | +-------------+---------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | matchLabels | :ref:`matchLabels ` object | Matching field of an EVS volume. The **size**, **volumeType**, **metadataEncrypted**, **metadataCmkid** and **count** fields are supported. | +-------------+---------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__response_matchlabels: .. table:: **Table 33** 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. Currently, SSD, GPSSD and SAS are supported. | +-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+ | metadataEncrypted | String | Disk encryption identifier. **0** indicates that the disk is not encrypted, and **1** indicates that the disk is encrypted. | +-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+ | metadataCmkid | String | Customer master key ID of an encrypted disk. The value is a 36-byte string. | +-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+ | count | String | Number of disks to be selected. If this parameter is left blank, all disks of this type are selected. | +-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__response_storagegroups: .. table:: **Table 34** StorageGroups +---------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +===============+===========================================================================+===================================================================================================================================================================+ | name | String | Name of a virtual storage group, which must be unique. | +---------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 | This parameter corresponds to **name** in **storageSelectors**. A group can match multiple selectors, but a selector can match only one group. | +---------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | virtualSpaces | Array of :ref:`VirtualSpace ` objects | Detailed management of space configuration in a group. | +---------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__response_virtualspace: .. table:: **Table 35** VirtualSpace +-----------------------+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+===================================================================+=============================================================================================================================+ | name | String | Name of a virtualSpace. | | | | | | | | - **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 sum of the percentages of all virtualSpaces in a group cannot exceed 100%. | +-----------------------+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | lvmConfig | :ref:`LVMConfig ` object | LVM configurations, applicable to **kubernetes** and **user** spaces. Note that one virtual space supports only one config. | +-----------------------+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | runtimeConfig | :ref:`RuntimeConfig ` object | runtime configurations, applicable to the **runtime** space. Note that one virtual space supports only one config. | +-----------------------+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__response_lvmconfig: .. table:: **Table 36** 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 | Path to which the disk is attached. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed. | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__response_runtimeconfig: .. table:: **Table 37** 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. | +-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Example response**: .. code-block:: { "kind": "Node", "apiVersion": "v3", "metadata": { "name": "myhost", "uid": "4d1ecb2c-229a-11e8-9c75-0255ac100ceb", "labels": { "foo": "bar" }, "annotations": { "annotation1": "abc" } }, "spec": { "flavor": "s1.medium", "az": "eu-de-01", "os": "EulerOS 2.5", "login": { "sshKey": "Keypai-demo" }, "rootVolume": { "volumetype": "SAS", "size": 40 }, "dataVolumes": [ { "volumetype": "SAS", "size": 100 } ], "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%" } ] } ] }, "publicIP": { "count": 2, "eip": { "iptype": "5_bgp", "bandwidth": { "size": 10, "sharetype": "PER", "chargemode": "traffic" } } }, "nodeNicSpec": { "primaryNic": { "subnetId": "2afc3d7f-07d1-4c25-ba2e-8ee48d253d9f" } }, "count": 2, "extendParam": { "chargingMode": 0, "ecs:performancetype": "normal", "init-node-password": "", "orderID": "", "productID": "" } }, "status": { "jobID": "2ec9b78d-9368-46f3-8f29-d1a95622a568" } } CCE Turbo cluster: .. code-block:: { "kind": "Node", "apiversion": "v3", "metadata": { "name": "turbo-cluster-node", "uid": "5ecfddfe-87db-11ec-b5e5-0255ac101514" }, "spec": { "flavor": "cce.c4.22xlarge.4.physical.129nic", "az": "eu-de-01", "login": { "sshKey": "id_rsa" }, "rootVolume": { "size": 40, "volumetype": "SAS", "hw:passthrough": true }, "dataVolumes": [ { "size": 100, "volumetype": "SAS", "hw:passthrough": true } ], "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, "runtime": { "name": "containerd" }, "extendParam": { "alpha.cce/NodeImageID":"0fea78c3-1b31-4653-8859-ac151ccadcd4" } }, "status": { "jobID": "5ec1518c-87db-11ec-b5e5-0255ac101514" } } Status Code ----------- :ref:`Table 38 ` describes the status codes of this API. .. _cce_02_0242__en-us_topic_0079614900_table46761928: .. table:: **Table 38** Status code +-------------+----------------------------------------------------------------------------+ | Status Code | Description | +=============+============================================================================+ | 201 | The job for creating a node in a specified cluster is successfully issued. | +-------------+----------------------------------------------------------------------------+ For the description about error status codes, see :ref:`Status Code `.