diff --git a/api-ref/source/_static/images/en-us_image_0000001207129076.png b/api-ref/source/_static/images/en-us_image_0000001207129076.png new file mode 100644 index 0000000..771d96d Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001207129076.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001207129902.png b/api-ref/source/_static/images/en-us_image_0000001207129902.png new file mode 100644 index 0000000..28794ba Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001207129902.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001207457192.png b/api-ref/source/_static/images/en-us_image_0000001207457192.png new file mode 100644 index 0000000..0286883 Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001207457192.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001207617538.png b/api-ref/source/_static/images/en-us_image_0000001207617538.png new file mode 100644 index 0000000..2c2ab79 Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001207617538.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001207618830.png b/api-ref/source/_static/images/en-us_image_0000001207618830.png new file mode 100644 index 0000000..0a01f11 Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001207618830.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001251962373.png b/api-ref/source/_static/images/en-us_image_0000001251962373.png new file mode 100644 index 0000000..6e8563d Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001251962373.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001252018205.png b/api-ref/source/_static/images/en-us_image_0000001252018205.png new file mode 100644 index 0000000..dec24b1 Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001252018205.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001252020583.png b/api-ref/source/_static/images/en-us_image_0000001252020583.png new file mode 100644 index 0000000..be60d6b Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001252020583.png differ diff --git a/api-ref/source/apis/cluster_management/accepting_a_node.rst b/api-ref/source/apis/cluster_management/accepting_a_node.rst new file mode 100644 index 0000000..ba60b44 --- /dev/null +++ b/api-ref/source/apis/cluster_management/accepting_a_node.rst @@ -0,0 +1,498 @@ +:original_name: AddNode.html + +.. _AddNode: + +Accepting a Node +================ + +Function +-------- + +This API is used to accept a node into a specified cluster. + +.. note:: + + The URL for cluster management is in the format of https://Endpoint/uri. In the URL, **uri** indicates the resource path, that is, the path for API access. + +URI +--- + +POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/add + +.. table:: **Table 1** Path Parameters + + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+========+==========================================================================================================================+ + | project_id | Yes | String | Project ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | cluster_id | Yes | String | Cluster ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==============+===========+========+=================================================================================================================================================================================================================================================+ + | Content-Type | Yes | String | Message body type (format). | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | X-Auth-Token | Yes | String | Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see :ref:`API Usage Guidelines `. | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. table:: **Table 3** Request body parameters + + +------------+-----------+-----------------------------------------------------------------------------------------+--------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+=========================================================================================+============================================+ + | apiVersion | Yes | String | API version. The value is fixed at **v3**. | + +------------+-----------+-----------------------------------------------------------------------------------------+--------------------------------------------+ + | kind | Yes | String | API type. The value is fixed at **List**. | + +------------+-----------+-----------------------------------------------------------------------------------------+--------------------------------------------+ + | nodeList | Yes | Array of :ref:`AddNode ` objects | List of the nodes to be accepted. | + +------------+-----------+-----------------------------------------------------------------------------------------+--------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_addnode: + +.. table:: **Table 4** AddNode + + +-----------+-----------+---------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+===================================================================================================+==========================================================================================================+ + | serverID | Yes | String | Server ID. For details about how to obtain the server ID, see the ECS or BMS documentation. | + +-----------+-----------+---------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | spec | Yes | :ref:`ReinstallNodeSpec ` object | Node reinstallation configuration parameters. Currently, accepted nodes cannot be added into node pools. | + +-----------+-----------+---------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_reinstallnodespec: + +.. table:: **Table 5** ReinstallNodeSpec + + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+=================+===================================================================================================================+=====================================================================================================================================================================================================================================================================================================================================+ + | os | Yes | String | Operating system. If you specify a custom image, the actual OS version in the IMS image is used. Select an OS version supported by the current cluster, for example, EulerOS 2.5, CentOS 7.7, or EulerOS 2.9. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | login | Yes | :ref:`Login ` object | Node login mode. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Node name. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | Specifying this field during reinstallation will change the node name, and the server name will change accordingly. By default, the current server name is used as the node name. Enter 1 to 56 characters starting with a letter and not ending with a hyphen (-). Only lowercase letters, digits, and hyphens (-) are allowed. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | serverConfig | No | :ref:`ReinstallServerConfig ` object | Server configuration. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | volumeConfig | No | :ref:`ReinstallVolumeConfig ` object | Volume management configuration. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtimeConfig | No | :ref:`ReinstallRuntimeConfig ` object | Container runtime configuration. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | k8sOptions | No | :ref:`ReinstallK8sOptionsConfig ` object | Kubernetes node configuration. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | lifecycle | No | :ref:`NodeLifecycleConfig ` object | Customized lifecycle configuration of a node. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | initializedConditions | No | Array of strings | Custom initialization flag. | + | | | | | + | | | | Before CCE nodes are initialized, they are tainted with **node.cloudprovider.kubernetes.io/uninitialized** to prevent pods from being scheduled to them. | + | | | | | + | | | | CCE supports custom initialization flags. After receiving the **initializedConditions** parameter, CCE converts the parameter value into a node label and provisions the label with the node, for example, **cloudprovider.openvessel.io/inject-initialized-conditions=CCEInitial_CustomedInitial**. | + | | | | | + | | | | After the node is labeled, its **status.Conditions** is polled to check whether the **type** of **conditions** has a flag name, such as **CCEInitial** and **CustomedInitial**. If all input flags exist and their status is **True**, the node initialization is complete and the initialization taint is removed. | + | | | | | + | | | | - Use only letters and digits. Max. characters: 20. | + | | | | - Max. flags: 2. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extendParam | No | :ref:`ReinstallExtendParam ` object | Extended reinstallation parameter, which is discarded. | + +-----------------------+-----------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_login: + +.. table:: **Table 6** Login + + ========= ========= ====== ==================================== + Parameter Mandatory Type Description + ========= ========= ====== ==================================== + sshKey No String Name of the key pair used for login. + ========= ========= ====== ==================================== + +.. _addnode__en-us_topic_0000001417516392_request_reinstallserverconfig: + +.. table:: **Table 7** ReinstallServerConfig + + +------------+-----------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+=======================================================================================================+===========================================================================================================================================================================================================================================================+ + | userTags | No | Array of :ref:`UserTag ` objects | Cloud server labels. The key of a label must be unique. The maximum number of user-defined labels supported by CCE depends on the region. In the region that supports the least number of labels, you can still create up to 5 labels for a cloud server. | + +------------+-----------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rootVolume | No | :ref:`ReinstallVolumeSpec ` object | System disk configurations used in reinstallation. | + +------------+-----------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_usertag: + +.. table:: **Table 8** UserTag + + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+===============================================================================================+ + | key | No | String | Key of the cloud server label. The value cannot start with **CCE-** or **\__type_baremetal**. | + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------+ + | value | No | String | Value of the cloud server label. | + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_reinstallvolumespec: + +.. table:: **Table 9** ReinstallVolumeSpec + + +-----------+-----------+--------+------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+================================================================================================+ + | imageID | No | String | Custom image ID. | + +-----------+-----------+--------+------------------------------------------------------------------------------------------------+ + | cmkID | No | String | User master key ID. If this parameter is left blank by default, the EVS disk is not encrypted. | + +-----------+-----------+--------+------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_reinstallvolumeconfig: + +.. table:: **Table 10** ReinstallVolumeConfig + + +-----------------+-----------------+-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+===============================================================================+===========================================================================================================================================================================================================+ + | lvmConfig | No | String | Docker data disk configurations. | + | | | | | + | | | | The following is an example default configuration: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "lvmConfig":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | | + | | | | The following fields are included: | + | | | | | + | | | | - **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 **evs**, **hdd**, and **ssd** are supported. | + | | | | - **lvType**: type of a logic volume. The value can be **linear** or **striped**. | + | | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | + | | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | + +-----------------+-----------------+-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-----------------+-----------------+-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_storage: + +.. table:: **Table 11** 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. | + +------------------+-----------+-----------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_storageselectors: + +.. table:: **Table 12** 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. | + +-------------+-----------+---------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_matchlabels: + +.. table:: **Table 13** 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. | + +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_storagegroups: + +.. table:: **Table 14** 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. | + +---------------+-----------+---------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_virtualspace: + +.. table:: **Table 15** 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. | + +-----------------+-----------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_lvmconfig: + +.. table:: **Table 16** 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. | + +-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_runtimeconfig: + +.. table:: **Table 17** 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. | + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_reinstallruntimeconfig: + +.. table:: **Table 18** ReinstallRuntimeConfig + + +-----------------+-----------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+===============================================================================+======================================================================================================================================================================================================================================================================================================================================+ + | dockerBaseSize | No | Integer | Available disk space of a single container on a node, in GB. | + | | | | | + | | | | If this parameter is left blank or is set to **0**, the default value is used. In Device Mapper mode, the default value is **10**. In OverlayFS mode, the available space of a single container is not limited by default, and the **dockerBaseSize** setting takes effect only on EulerOS nodes in the cluster of the new version. | + | | | | | + | | | | When Device Mapper is used, you are advised to set **dockerBaseSize** to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device. | + +-----------------+-----------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | No | :ref:`Runtime ` object | Container runtime. Defaults to **docker**. | + +-----------------+-----------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_runtime: + +.. table:: **Table 19** Runtime + + ========= ========= ====== ========================================== + Parameter Mandatory Type Description + ========= ========= ====== ========================================== + name No String Container runtime. Defaults to **docker**. + ========= ========= ====== ========================================== + +.. _addnode__en-us_topic_0000001417516392_request_reinstallk8soptionsconfig: + +.. table:: **Table 20** ReinstallK8sOptionsConfig + + +-----------------+-----------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=====================================================================================+=====================================================================================================================================================================================================================================================================================+ + | labels | No | Map | Defined in key-value pairs. A maximum of 20 key-value pairs are allowed. | + | | | | | + | | | | - **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 contain 1 to 63 characters that start 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 | Array of :ref:`Taint ` objects | Taints can be added for anti-affinity when creating nodes. A maximum of 20 taints can be added. 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" | + | | | | }] | + +-----------------+-----------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | maxPods | No | Integer | Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256. This limit prevents the node from being overloaded of pods. | + +-----------------+-----------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nicMultiqueue | No | String | - Number of ENI queues. Example setting: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "[{\"queue\":4}]" | + | | | | | + | | | | The following fields are included: | + | | | | | + | | | | - **queue**: number of ENI queues. | + | | | | - This field can be configured only for BMS nodes in a CCE Turbo cluster. | + | | | | - Supported proportions are {"1":128, "2":92, "4":92, "8":32, "16":16, "28":9}. That is, if there is one queue, a maximum of 128 ENIs can be bound. If there are two queues, a maximum of 92 ENIs can be bound for two queues. | + | | | | - A larger number of ENI queues indicates higher performance but fewer ENIs can be bound. The queue settings cannot be changed after the node pool is created. | + +-----------------+-----------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nicThreshold | No | String | - ENI pre-binding thresholds. Example setting: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "0.3:0.6" | + | | | | | + | | | | - Low threshold (L): determines the minimum number of pre-bound ENIs (Min). Formula: Min = Total number of ENIs of the node x L | + | | | | - High threshold (H): determines the maximum number of pre-bound ENIs (Max). Formula: Max = Total number of ENIs of the node x H | + | | | | - Number of ENIs bound to a BMS node (B) and number of ENIs being used by pods (U): U + Min < B < U + Max | + | | | | - If the number of pre-bound ENIs on a BMS node is smaller than the minimum allowed, the system will bind more ENIs to make the numbers equal. | + | | | | - If the number of pre-bound ENIs on a BMS node is larger than the maximum allowed, the system periodically unbinds ENIs (about every 2 minutes) to make the numbers equal. | + | | | | - Both the thresholds are one-decimal-place values ranging from 0.0 to 1.0. The low threshold must be smaller than or equal to the high one. | + | | | | - This field can be configured only for BMS nodes in a CCE Turbo cluster. | + | | | | - Pre-binding ENIs can speed up workload creation but occupies IP addresses. | + +-----------------+-----------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_taint: + +.. table:: **Table 21** Taint + + ========= ========= ====== =========== + Parameter Mandatory Type Description + ========= ========= ====== =========== + key Yes String Key. + value No String Value. + effect Yes String Effect. + ========= ========= ====== =========== + +.. _addnode__en-us_topic_0000001417516392_request_nodelifecycleconfig: + +.. table:: **Table 22** NodeLifecycleConfig + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=================================================================================================+ + | preInstall | No | String | Pre-installation script. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------+ + | postInstall | No | String | Post-installation script. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------+ + +.. _addnode__en-us_topic_0000001417516392_request_reinstallextendparam: + +.. table:: **Table 23** ReinstallExtendParam + + +-----------------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+===========+========+==============================================================================================================================================================================================+ + | alpha.cce/NodeImageID | No | String | (Discarded) ID of the user image to run the target OS. Specifying this parameter is equivalent to specifying **imageID** in **ReinstallVolumeSpec**. The original value will be overwritten. | + +-----------------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 24** Response body parameters + + +-----------+--------+-------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+=======================================================================================================+ + | jobid | String | Job ID returned after the job is delivered. The job ID can be used to query the job execution status. | + +-----------+--------+-------------------------------------------------------------------------------------------------------+ + +Example Requests +---------------- + +Accepting a Node + +.. code-block:: text + + POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/add + + { + "kind" : "List", + "apiVersion" : "v3", + "nodeList" : [ { + "serverID" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "spec" : { + "name" : "my-ecs-0001", + "os" : "EulerOS 2.5", + "login" : { + "sshKey" : "KeyPair-001" + } + } + } ] + } + +Example Responses +----------------- + +**Status code: 200** + +The job for accepting a node into a specified cluster is successfully delivered. + +.. code-block:: + + { + "jobid" : "2ec9b78d-9368-46f3-8f29-d1a95622a568" + } + +Status Codes +------------ + ++-------------+----------------------------------------------------------------------------------+ +| Status Code | Description | ++=============+==================================================================================+ +| 200 | The job for accepting a node into a specified cluster is successfully delivered. | ++-------------+----------------------------------------------------------------------------------+ + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/cluster_management/creating_a_node.rst b/api-ref/source/apis/cluster_management/creating_a_node.rst index 60bf0f6..12665e0 100644 --- a/api-ref/source/apis/cluster_management/creating_a_node.rst +++ b/api-ref/source/apis/cluster_management/creating_a_node.rst @@ -119,138 +119,148 @@ Request .. 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. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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**. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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: @@ -457,6 +467,112 @@ Request | | | | - 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: @@ -485,11 +601,38 @@ CCE cluster: "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": [ { @@ -559,6 +702,38 @@ CCE Turbo cluster: "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" } @@ -570,11 +745,11 @@ Response **Response parameters**: -:ref:`Table 16 ` describes the response parameters. +:ref:`Table 23 ` describes the response parameters. .. _cce_02_0242__en-us_topic_0079616779_en-us_topic_0079614912_ref458774242: -.. table:: **Table 16** Response parameters +.. table:: **Table 23** Response parameters +------------+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -592,7 +767,7 @@ Response .. _cce_02_0242__table0360745335: -.. table:: **Table 17** Data structure of the **metadata** field +.. table:: **Table 24** Data structure of the **metadata** field +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -636,7 +811,7 @@ Response .. _cce_02_0242__table13949117115810: -.. table:: **Table 18** Data structure of the **spec** field +.. table:: **Table 25** Data structure of the **spec** field +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -659,6 +834,16 @@ Response +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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. | @@ -763,7 +948,7 @@ Response .. _cce_02_0242__table162751117166: -.. table:: **Table 19** Data structure of the nodeNicSpec field +.. table:: **Table 26** Data structure of the nodeNicSpec field +------------+------------------------------------------------------------------+------------------------------------+ | Parameter | Type | Description | @@ -775,7 +960,7 @@ Response .. _cce_02_0242__table614985275016: -.. table:: **Table 20** Data structure of the primaryNic/extNics field +.. table:: **Table 27** Data structure of the primaryNic/extNics field +-----------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -789,7 +974,7 @@ Response .. _cce_02_0242__table2039318361484: -.. table:: **Table 21** Data structure of the **extendParam** field +.. table:: **Table 28** Data structure of the **extendParam** field +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -840,7 +1025,7 @@ Response .. _cce_02_0242__table9637161310338: -.. table:: **Table 22** Data structure of the **status** field +.. table:: **Table 29** Data structure of the **status** field +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -865,7 +1050,7 @@ Response .. _cce_02_0242__table483064395515: -.. table:: **Table 23** Runtime +.. table:: **Table 30** Runtime +-----------------------+-----------------------+-----------------------------------------------------+ | Parameter | Type | Description | @@ -878,6 +1063,112 @@ Response | | | - 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:: @@ -906,12 +1197,38 @@ Response "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": { @@ -964,13 +1281,38 @@ CCE Turbo cluster: "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" @@ -987,11 +1329,11 @@ CCE Turbo cluster: Status Code ----------- -:ref:`Table 24 ` describes the status codes of this API. +:ref:`Table 38 ` describes the status codes of this API. .. _cce_02_0242__en-us_topic_0079614900_table46761928: -.. table:: **Table 24** Status code +.. table:: **Table 38** Status code +-------------+----------------------------------------------------------------------------+ | Status Code | Description | diff --git a/api-ref/source/apis/cluster_management/index.rst b/api-ref/source/apis/cluster_management/index.rst index 6031410..03db36e 100644 --- a/api-ref/source/apis/cluster_management/index.rst +++ b/api-ref/source/apis/cluster_management/index.rst @@ -22,6 +22,10 @@ Cluster Management - :ref:`Reading Job Progress ` - :ref:`Querying the Access Information of a Specified Cluster ` - :ref:`Modifying the Access Information of a Specified Cluster ` +- :ref:`Accepting a Node ` +- :ref:`Resetting a Node ` +- :ref:`Removing a Node ` +- :ref:`Migrating a Node ` - :ref:`Creating a Node Pool ` - :ref:`Querying a Specified Node Pool ` - :ref:`Updating a Specified Node Pool ` @@ -49,6 +53,10 @@ Cluster Management reading_job_progress querying_the_access_information_of_a_specified_cluster modifying_the_access_information_of_a_specified_cluster + accepting_a_node + resetting_a_node + removing_a_node + migrating_a_node creating_a_node_pool querying_a_specified_node_pool updating_a_specified_node_pool diff --git a/api-ref/source/apis/cluster_management/migrating_a_node.rst b/api-ref/source/apis/cluster_management/migrating_a_node.rst new file mode 100644 index 0000000..b54b9c3 --- /dev/null +++ b/api-ref/source/apis/cluster_management/migrating_a_node.rst @@ -0,0 +1,342 @@ +:original_name: MigrateNode.html + +.. _MigrateNode: + +Migrating a Node +================ + +Function +-------- + +This API is used to migrate a node from a specified cluster to another cluster (both clusters must in the same VPC). Physical nodes of the ECS service in a CCE Turbo cluster cannot be migrated. + +.. note:: + + The URL for cluster management is in the format of \**https://Endpoint/uri, in which *uri* indicates the resource path, that is, the path for API access. + +URI +--- + +PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/migrateto/{target_cluster_id} + +.. table:: **Table 1** Path Parameters + + +-------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===================+===========+========+==========================================================================================================================+ + | project_id | Yes | String | Project ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +-------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | cluster_id | Yes | String | Cluster ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +-------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | target_cluster_id | Yes | String | Cluster ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +-------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==============+===========+========+=================================================================================================================================================================================================================================================+ + | Content-Type | Yes | String | Message body type (format). | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | X-Auth-Token | Yes | String | Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see :ref:`API Usage Guidelines `. | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. table:: **Table 3** Request body parameters + + +------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+=====================================================================================================+=======================================================+ + | apiVersion | No | String | API version. The value is fixed at **v3**. | + +------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | kind | No | String | API type. The value is fixed at **MigrateNodesTask**. | + +------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | spec | Yes | :ref:`MigrateNodesSpec ` object | Configuration data. | + +------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | status | No | :ref:`TaskStatus ` object | Job status. | + +------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_request_migratenodesspec: + +.. table:: **Table 4** MigrateNodesSpec + + +-------------+-----------+-----------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+=================================================================================================================+=======================================================================================================================================================================================+ + | os | Yes | String | Operating system type, which must be accurate to the version number. When **alpha.cce/NodeImageID** is specified, the value of **os** must be the same as the OS of the custom image. | + +-------------+-----------+-----------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extendParam | No | :ref:`MigrateNodeExtendParam ` object | Extended parameters for node migration. | + +-------------+-----------+-----------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | login | Yes | :ref:`Login ` object | Node login mode. | + +-------------+-----------+-----------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nodes | Yes | Array of :ref:`NodeItem ` objects | List of nodes to be operated. | + +-------------+-----------+-----------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_request_migratenodeextendparam: + +.. table:: **Table 5** MigrateNodeExtendParam + + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=========================+=================+=================+=====================================================================================================================================================================================================================================================================================================================+ + | maxPods | No | Integer | Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256. This limit prevents the node from being overloaded of pods. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | DockerLVMConfigOverride | No | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.) | + | | | | | + | | | | The disk type of the nodes to be migrated must be the same as that specified during node creation (that is, the value of **diskType** in **DockerLVMConfigOverride** must be the same as that specified during node creation). Ensure that the disk types of the nodes selected for a single API call are the same. | + | | | | | + | | | | Example default configuration: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | | + | | | | The following fields are included: | + | | | | | + | | | | - **userLV** (optional): size of the user space, for example, **vgpaas/20%VG**. | + | | | | - **userPath** (optional): mount path of the user space, for example, **/home/wqt-test**. | + | | | | - **diskType**: disk type. Currently, only **evs**, **hdd**, and **ssd** are supported. | + | | | | - **lvType**: type of a logic volume. The value can be **linear** or **striped**. | + | | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | + | | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/preInstall | No | String | Pre-installation script. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/postInstall | No | String | Post-installation script. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/NodeImageID | No | String | ID of the user image to run the target OS. When **alpha.cce/NodeImageID** is specified, the value of **os** must be the same as the OS of the custom image. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_request_login: + +.. table:: **Table 6** Login + + ========= ========= ====== ==================================== + Parameter Mandatory Type Description + ========= ========= ====== ==================================== + sshKey No String Name of the key pair used for login. + ========= ========= ====== ==================================== + +.. _migratenode__en-us_topic_0000001467833433_request_nodeitem: + +.. table:: **Table 7** NodeItem + + ========= ========= ====== =========== + Parameter Mandatory Type Description + ========= ========= ====== =========== + uid Yes String Node ID. + ========= ========= ====== =========== + +.. _migratenode__en-us_topic_0000001467833433_request_taskstatus: + +.. table:: **Table 8** TaskStatus + + +-----------+-----------+--------+----------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+================================================================+ + | jobID | No | String | Job ID, which is used by the caller to query the job progress. | + +-----------+-----------+--------+----------------------------------------------------------------+ + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 9** Response body parameters + + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | Parameter | Type | Description | + +============+======================================================================================================+=======================================================+ + | apiVersion | String | API version. The value is fixed at **v3**. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | kind | String | API type. The value is fixed at **MigrateNodesTask**. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | spec | :ref:`MigrateNodesSpec ` object | Configuration data. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | status | :ref:`TaskStatus ` object | Job status. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_response_migratenodesspec: + +.. table:: **Table 10** MigrateNodesSpec + + +-------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=============+==================================================================================================================+=======================================================================================================================================================================================+ + | os | String | Operating system type, which must be accurate to the version number. When **alpha.cce/NodeImageID** is specified, the value of **os** must be the same as the OS of the custom image. | + +-------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extendParam | :ref:`MigrateNodeExtendParam ` object | Extended parameters for node migration. | + +-------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | login | :ref:`Login ` object | Node login mode. | + +-------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nodes | Array of :ref:`NodeItem ` objects | List of nodes to be operated. | + +-------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_response_migratenodeextendparam: + +.. table:: **Table 11** MigrateNodeExtendParam + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+=====================================================================================================================================================================================================================================================================================================================+ + | maxPods | Integer | Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256. This limit prevents the node from being overloaded of pods. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | DockerLVMConfigOverride | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.) | + | | | | + | | | The disk type of the nodes to be migrated must be the same as that specified during node creation (that is, the value of **diskType** in **DockerLVMConfigOverride** must be the same as that specified during node creation). Ensure that the disk types of the nodes selected for a single API call are the same. | + | | | | + | | | Example default configuration: | + | | | | + | | | .. code-block:: | + | | | | + | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | + | | | The following fields are included: | + | | | | + | | | - **userLV** (optional): size of the user space, for example, **vgpaas/20%VG**. | + | | | - **userPath** (optional): mount path of the user space, for example, **/home/wqt-test**. | + | | | - **diskType**: disk type. Currently, only **evs**, **hdd**, and **ssd** are supported. | + | | | - **lvType**: type of a logic volume. The value can be **linear** or **striped**. | + | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | + | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/preInstall | String | Pre-installation script. | + | | | | + | | | .. note:: | + | | | | + | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/postInstall | String | Post-installation script. | + | | | | + | | | .. note:: | + | | | | + | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/NodeImageID | String | ID of the user image to run the target OS. When **alpha.cce/NodeImageID** is specified, the value of **os** must be the same as the OS of the custom image. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_response_login: + +.. table:: **Table 12** Login + + ========= ====== ==================================== + Parameter Type Description + ========= ====== ==================================== + sshKey String Name of the key pair used for login. + ========= ====== ==================================== + +.. _migratenode__en-us_topic_0000001467833433_response_nodeitem: + +.. table:: **Table 13** NodeItem + + ========= ====== =========== + Parameter Type Description + ========= ====== =========== + uid String Node ID. + ========= ====== =========== + +.. _migratenode__en-us_topic_0000001467833433_response_taskstatus: + +.. table:: **Table 14** TaskStatus + + +-----------+--------+----------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+================================================================+ + | jobID | String | Job ID, which is used by the caller to query the job progress. | + +-----------+--------+----------------------------------------------------------------+ + +Example Requests +---------------- + +- Migrating a Node + + .. code-block:: text + + PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/migrateto/{target_cluster_id} + + { + "spec" : { + "os" : "EulerOS 2.5", + "login" : { + "sshKey" : "KeyPair-001" + }, + "nodes" : [ { + "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, { + "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" + } ] + } + } + +- Migrating a node using a specified user image ID + + .. code-block:: text + + PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/migrateto/{target_cluster_id} + + { + "spec" : { + "os" : "EulerOS 2.5", + "extendParam" : { + "alpha.cce/NodeImageID" : "cc697ad7-9563-11e8-8ea7-0255ac106311" + }, + "login" : { + "sshKey" : "KeyPair-001" + }, + "nodes" : [ { + "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, { + "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" + } ] + } + } + +Example Responses +----------------- + +**Status code: 200** + +The job for migrating a node from a specified cluster to another cluster is successfully delivered. + +.. code-block:: + + { + "spec" : { + "os" : "EulerOS 2.5", + "login" : { + "sshKey" : "KeyPair-001" + }, + "nodes" : [ { + "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, { + "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" + } ] + }, + "status" : { + "jobID" : "2ec9b78d-9368-46f3-8f29-d1a95622a568" + } + } + +Status Codes +------------ + ++-------------+-----------------------------------------------------------------------------------------------------+ +| Status Code | Description | ++=============+=====================================================================================================+ +| 200 | The job for migrating a node from a specified cluster to another cluster is successfully delivered. | ++-------------+-----------------------------------------------------------------------------------------------------+ + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/cluster_management/reading_a_specified_node.rst b/api-ref/source/apis/cluster_management/reading_a_specified_node.rst index 94a0237..b19ff15 100644 --- a/api-ref/source/apis/cluster_management/reading_a_specified_node.rst +++ b/api-ref/source/apis/cluster_management/reading_a_specified_node.rst @@ -147,71 +147,81 @@ Response .. table:: **Table 7** 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. | - +-----------------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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. | - +-----------------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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. | - +-----------------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | runtime | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | - +-----------------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | extendParam | :ref:`extendParam ` object | Extended parameter. Format: Key-value pair. | - +-----------------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-----------------------+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-----------------------+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | + +-----------------------+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extendParam | :ref:`extendParam ` object | Extended parameter. Format: Key-value pair. | + +-----------------------+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0243__table162751117166: @@ -345,6 +355,112 @@ Response | privateIP | String | Private IP address used by the node to communicate with other nodes in the same VPC as the current cluster. | +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------+ +.. _cce_02_0243__response_storage: + +.. table:: **Table 13** 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_0243__response_storageselectors: + +.. table:: **Table 14** 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_0243__response_matchlabels: + +.. table:: **Table 15** 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_0243__response_storagegroups: + +.. table:: **Table 16** 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_0243__response_virtualspace: + +.. table:: **Table 17** 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_0243__response_lvmconfig: + +.. table:: **Table 18** 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_0243__response_runtimeconfig: + +.. table:: **Table 19** 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:: @@ -395,11 +511,11 @@ Response Status Code ----------- -:ref:`Table 13 ` describes the status code of this API. +:ref:`Table 20 ` describes the status code of this API. .. _cce_02_0243__en-us_topic_0079614900_table46761928: -.. table:: **Table 13** Status code +.. table:: **Table 20** Status code +-------------+-------------------------------------------------------------------------------+ | Status Code | Description | diff --git a/api-ref/source/apis/cluster_management/removing_a_node.rst b/api-ref/source/apis/cluster_management/removing_a_node.rst new file mode 100644 index 0000000..be19ec0 --- /dev/null +++ b/api-ref/source/apis/cluster_management/removing_a_node.rst @@ -0,0 +1,221 @@ +:original_name: RemoveNode.html + +.. _RemoveNode: + +Removing a Node +=============== + +Function +-------- + +This API is used to remove a node from a specified cluster. + +.. note:: + + The URL for cluster management is in the format of https://Endpoint/uri. In the URL, **uri** indicates the resource path, that is, the path for API access. + +URI +--- + +PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/remove + +.. table:: **Table 1** Path Parameters + + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+========+==========================================================================================================================+ + | project_id | Yes | String | Project ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | cluster_id | Yes | String | Cluster ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==============+===========+========+=================================================================================================================================================================================================================================================+ + | Content-Type | Yes | String | Message body type (format). | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | X-Auth-Token | Yes | String | Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see :ref:`API Usage Guidelines `. | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. table:: **Table 3** Request body parameters + + +------------+-----------+--------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+==================================================================================================+======================================================+ + | apiVersion | No | String | API version. The value is fixed at **v3**. | + +------------+-----------+--------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | kind | No | String | API type. The value is fixed at **RemoveNodesTask**. | + +------------+-----------+--------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | spec | Yes | :ref:`RemoveNodesSpec ` object | Configuration information. | + +------------+-----------+--------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | status | No | :ref:`TaskStatus ` object | Job status. | + +------------+-----------+--------------------------------------------------------------------------------------------------+------------------------------------------------------+ + +.. _removenode__en-us_topic_0000001417833320_request_removenodesspec: + +.. table:: **Table 4** RemoveNodesSpec + + +-----------+-----------+----------------------------------------------------------------------------------------------+-------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+==============================================================================================+===============================+ + | login | Yes | :ref:`Login ` object | Node login mode. | + +-----------+-----------+----------------------------------------------------------------------------------------------+-------------------------------+ + | nodes | Yes | Array of :ref:`NodeItem ` objects | List of nodes to be operated. | + +-----------+-----------+----------------------------------------------------------------------------------------------+-------------------------------+ + +.. _removenode__en-us_topic_0000001417833320_request_login: + +.. table:: **Table 5** Login + + ========= ========= ====== ==================================== + Parameter Mandatory Type Description + ========= ========= ====== ==================================== + sshKey No String Name of the key pair used for login. + ========= ========= ====== ==================================== + +.. _removenode__en-us_topic_0000001417833320_request_nodeitem: + +.. table:: **Table 6** NodeItem + + ========= ========= ====== =========== + Parameter Mandatory Type Description + ========= ========= ====== =========== + uid Yes String Node ID. + ========= ========= ====== =========== + +.. _removenode__en-us_topic_0000001417833320_request_taskstatus: + +.. table:: **Table 7** TaskStatus + + +-----------+-----------+--------+----------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+================================================================+ + | jobID | No | String | Job ID, which is used by the caller to query the job progress. | + +-----------+-----------+--------+----------------------------------------------------------------+ + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 8** Response body parameters + + +------------+---------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | Parameter | Type | Description | + +============+===================================================================================================+======================================================+ + | apiVersion | String | API version. The value is fixed at **v3**. | + +------------+---------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | kind | String | API type. The value is fixed at **RemoveNodesTask**. | + +------------+---------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | spec | :ref:`RemoveNodesSpec ` object | Configuration information. | + +------------+---------------------------------------------------------------------------------------------------+------------------------------------------------------+ + | status | :ref:`TaskStatus ` object | Job status. | + +------------+---------------------------------------------------------------------------------------------------+------------------------------------------------------+ + +.. _removenode__en-us_topic_0000001417833320_response_removenodesspec: + +.. table:: **Table 9** RemoveNodesSpec + + +-----------+-----------------------------------------------------------------------------------------------+-------------------------------+ + | Parameter | Type | Description | + +===========+===============================================================================================+===============================+ + | login | :ref:`Login ` object | Node login mode. | + +-----------+-----------------------------------------------------------------------------------------------+-------------------------------+ + | nodes | Array of :ref:`NodeItem ` objects | List of nodes to be operated. | + +-----------+-----------------------------------------------------------------------------------------------+-------------------------------+ + +.. _removenode__en-us_topic_0000001417833320_response_login: + +.. table:: **Table 10** Login + + ========= ====== ==================================== + Parameter Type Description + ========= ====== ==================================== + sshKey String Name of the key pair used for login. + ========= ====== ==================================== + +.. _removenode__en-us_topic_0000001417833320_response_nodeitem: + +.. table:: **Table 11** NodeItem + + ========= ====== =========== + Parameter Type Description + ========= ====== =========== + uid String Node ID. + ========= ====== =========== + +.. _removenode__en-us_topic_0000001417833320_response_taskstatus: + +.. table:: **Table 12** TaskStatus + + +-----------+--------+----------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+================================================================+ + | jobID | String | Job ID, which is used by the caller to query the job progress. | + +-----------+--------+----------------------------------------------------------------+ + +Example Requests +---------------- + +Removing a Node + +.. code-block:: text + + PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/remove + + { + "spec" : { + "login" : { + "sshKey" : "KeyPair-001" + }, + "nodes" : [ { + "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, { + "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" + } ] + } + } + +Example Responses +----------------- + +**Status code: 200** + +The job for removing a node in a specified cluster is successfully delivered. + +.. code-block:: + + { + "spec" : { + "login" : { + "sshKey" : "KeyPair-001" + }, + "nodes" : [ { + "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + }, { + "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" + } ] + }, + "status" : { + "jobID" : "2ec9b78d-9368-46f3-8f29-d1a95622a568" + } + } + +Status Codes +------------ + ++-------------+-------------------------------------------------------------------------------+ +| Status Code | Description | ++=============+===============================================================================+ +| 200 | The job for removing a node in a specified cluster is successfully delivered. | ++-------------+-------------------------------------------------------------------------------+ + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/cluster_management/resetting_a_node.rst b/api-ref/source/apis/cluster_management/resetting_a_node.rst new file mode 100644 index 0000000..e19f7a5 --- /dev/null +++ b/api-ref/source/apis/cluster_management/resetting_a_node.rst @@ -0,0 +1,519 @@ +:original_name: ResetNode.html + +.. _ResetNode: + +Resetting a Node +================ + +Function +-------- + +This API is used to reset a node in a specified cluster. + +.. note:: + + The URL for cluster management is in the format of https://Endpoint/uri. In the URL, **uri** indicates the resource path, that is, the path for API access. + +URI +--- + +POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/reset + +.. table:: **Table 1** Path Parameters + + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+========+==========================================================================================================================+ + | project_id | Yes | String | Project ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + | cluster_id | Yes | String | Cluster ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==============+===========+========+=================================================================================================================================================================================================================================================+ + | Content-Type | Yes | String | Message body type (format). | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | X-Auth-Token | Yes | String | Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see :ref:`API Usage Guidelines `. | + +--------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. table:: **Table 3** Request body parameters + + +------------+-----------+-----------------------------------------------------------------------------------------------+--------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+===============================================================================================+============================================+ + | apiVersion | Yes | String | API version. The value is fixed at **v3**. | + +------------+-----------+-----------------------------------------------------------------------------------------------+--------------------------------------------+ + | kind | Yes | String | API type. The value is fixed at **List**. | + +------------+-----------+-----------------------------------------------------------------------------------------------+--------------------------------------------+ + | nodeList | Yes | Array of :ref:`ResetNode ` objects | List of the nodes to be reset. | + +------------+-----------+-----------------------------------------------------------------------------------------------+--------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_resetnode: + +.. table:: **Table 4** ResetNode + + +-----------+-----------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+=====================================================================================================+=======================================================================================================================================================================================================================================+ + | nodeID | Yes | String | Node ID. For details about how to obtain the value, see :ref:`How to Obtain Parameters in the API URI `. | + +-----------+-----------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec | Yes | :ref:`ReinstallNodeSpec ` object | Node reinstallation configuration parameters. Nodes in a node pool cannot be specified externally. These nodes will be reinstalled based on the node pool settings. By default, this parameter is mandatory for nodes in a node pool. | + +-----------+-----------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallnodespec: + +.. table:: **Table 5** ReinstallNodeSpec + + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+=================+=====================================================================================================================+=====================================================================================================================================================================================================================================================================================================================================+ + | os | Yes | String | Operating system. If you specify a custom image, the actual OS version in the IMS image is used. Select an OS version supported by the current cluster, for example, EulerOS 2.5, CentOS 7.7, or EulerOS 2.9. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | login | Yes | :ref:`Login ` object | Node login mode. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Node name. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | Specifying this field during reinstallation will change the node name, and the server name will change accordingly. By default, the current server name is used as the node name. Enter 1 to 56 characters starting with a letter and not ending with a hyphen (-). Only lowercase letters, digits, and hyphens (-) are allowed. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | serverConfig | No | :ref:`ReinstallServerConfig ` object | Server configuration. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | volumeConfig | No | :ref:`ReinstallVolumeConfig ` object | Volume management configuration. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtimeConfig | No | :ref:`ReinstallRuntimeConfig ` object | Container runtime configuration. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | k8sOptions | No | :ref:`ReinstallK8sOptionsConfig ` object | Kubernetes node configuration. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | lifecycle | No | :ref:`NodeLifecycleConfig ` object | Customized lifecycle configuration of a node. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | initializedConditions | No | Array of strings | Custom initialization flag. | + | | | | | + | | | | Before CCE nodes are initialized, they are tainted with **node.cloudprovider.kubernetes.io/uninitialized** to prevent pods from being scheduled to them. | + | | | | | + | | | | CCE supports custom initialization flags. After receiving the **initializedConditions** parameter, CCE converts the parameter value into a node label and provisions the label with the node, for example, **cloudprovider.openvessel.io/inject-initialized-conditions=CCEInitial_CustomedInitial**. | + | | | | | + | | | | After the node is labeled, its **status.Conditions** is polled to check whether the **type** of **conditions** has a flag name, such as **CCEInitial** and **CustomedInitial**. If all input flags exist and their status is **True**, the node initialization is complete and the initialization taint is removed. | + | | | | | + | | | | - Use only letters and digits. Max. characters: 20. | + | | | | - Max. flags: 2. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extendParam | No | :ref:`ReinstallExtendParam ` object | Extended reinstallation parameter, which is discarded. | + +-----------------------+-----------------+---------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_login: + +.. table:: **Table 6** Login + + ========= ========= ====== ==================================== + Parameter Mandatory Type Description + ========= ========= ====== ==================================== + sshKey No String Name of the key pair used for login. + ========= ========= ====== ==================================== + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallserverconfig: + +.. table:: **Table 7** ReinstallServerConfig + + +------------+-----------+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+=========================================================================================================+===========================================================================================================================================================================================================================================================+ + | userTags | No | Array of :ref:`UserTag ` objects | Cloud server labels. The key of a label must be unique. The maximum number of user-defined labels supported by CCE depends on the region. In the region that supports the least number of labels, you can still create up to 5 labels for a cloud server. | + +------------+-----------+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rootVolume | No | :ref:`ReinstallVolumeSpec ` object | System disk configurations used in reinstallation. | + +------------+-----------+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_usertag: + +.. table:: **Table 8** UserTag + + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+===============================================================================================+ + | key | No | String | Key of the cloud server label. The value cannot start with **CCE-** or **\__type_baremetal**. | + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------+ + | value | No | String | Value of the cloud server label. | + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallvolumespec: + +.. table:: **Table 9** ReinstallVolumeSpec + + +-----------+-----------+--------+------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+================================================================================================+ + | imageID | No | String | Custom image ID. | + +-----------+-----------+--------+------------------------------------------------------------------------------------------------+ + | cmkID | No | String | User master key ID. If this parameter is left blank by default, the EVS disk is not encrypted. | + +-----------+-----------+--------+------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallvolumeconfig: + +.. table:: **Table 10** ReinstallVolumeConfig + + +-----------------+-----------------+---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================================================================================+===========================================================================================================================================================================================================+ + | lvmConfig | No | String | Docker data disk configurations. | + | | | | | + | | | | The following is an example default configuration: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "lvmConfig":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | | + | | | | The following fields are included: | + | | | | | + | | | | - **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 **evs**, **hdd**, and **ssd** are supported. | + | | | | - **lvType**: type of a logic volume. The value can be **linear** or **striped**. | + | | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | + | | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | + +-----------------+-----------------+---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-----------------+-----------------+---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_storage: + +.. table:: **Table 11** 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. | + +------------------+-----------+-------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_storageselectors: + +.. table:: **Table 12** 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. | + +-------------+-----------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_matchlabels: + +.. table:: **Table 13** 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. Currently, SSD, GPSSD and SAS are supported. | + +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_storagegroups: + +.. table:: **Table 14** 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. | + +---------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_virtualspace: + +.. table:: **Table 15** 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. | + +-----------------+-----------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_lvmconfig: + +.. table:: **Table 16** 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. | + +-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_runtimeconfig: + +.. table:: **Table 17** 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. | + +-----------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallruntimeconfig: + +.. table:: **Table 18** ReinstallRuntimeConfig + + +-----------------+-----------------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================================================================================+======================================================================================================================================================================================================================================================================================================================================+ + | dockerBaseSize | No | Integer | Available disk space of a single container on a node, in GB. | + | | | | | + | | | | If this parameter is left blank or is set to **0**, the default value is used. In Device Mapper mode, the default value is **10**. In OverlayFS mode, the available space of a single container is not limited by default, and the **dockerBaseSize** setting takes effect only on EulerOS nodes in the cluster of the new version. | + | | | | | + | | | | When Device Mapper is used, you are advised to set **dockerBaseSize** to a value less than or equal to 80 GB. If the value is too large, the container runtime may fail to be started due to long initialization. If there are special requirements for the container disk space, you can mount an external or local storage device. | + +-----------------+-----------------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | No | :ref:`Runtime ` object | Container runtime. Defaults to **docker**. | + +-----------------+-----------------+---------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_runtime: + +.. table:: **Table 19** Runtime + + ========= ========= ====== ========================================== + Parameter Mandatory Type Description + ========= ========= ====== ========================================== + name No String Container runtime. Defaults to **docker**. + ========= ========= ====== ========================================== + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallk8soptionsconfig: + +.. table:: **Table 20** ReinstallK8sOptionsConfig + + +-----------------+-----------------+---------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=======================================================================================+=====================================================================================================================================================================================================================================================================================+ + | labels | No | Map | Defined in key-value pairs. A maximum of 20 key-value pairs are allowed. | + | | | | | + | | | | - **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 contain 1 to 63 characters that start 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 | Array of :ref:`Taint ` objects | Taints can be added for anti-affinity when creating nodes. A maximum of 20 taints can be added. 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" | + | | | | }] | + +-----------------+-----------------+---------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | maxPods | No | Integer | Maximum number of pods that can be created on a node, including the default system pods. Value range: 16 to 256. This limit prevents the node from being overloaded of pods. | + +-----------------+-----------------+---------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nicMultiqueue | No | String | - Number of ENI queues. Example setting: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "[{\"queue\":4}]" | + | | | | | + | | | | The following fields are included: | + | | | | | + | | | | - **queue**: number of ENI queues. | + | | | | - This field can be configured only for BMS nodes in a CCE Turbo cluster. | + | | | | - Supported proportions are {"1":128, "2":92, "4":92, "8":32, "16":16, "28":9}. That is, if there is one queue, a maximum of 128 ENIs can be bound. If there are two queues, a maximum of 92 ENIs can be bound for two queues. | + | | | | - A larger number of ENI queues indicates higher performance but fewer ENIs can be bound. The queue settings cannot be changed after the node pool is created. | + +-----------------+-----------------+---------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nicThreshold | No | String | - ENI pre-binding thresholds. Example setting: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "0.3:0.6" | + | | | | | + | | | | - Low threshold (L): determines the minimum number of pre-bound ENIs (Min). Formula: Min = Total number of ENIs of the node x L | + | | | | - High threshold (H): determines the maximum number of pre-bound ENIs (Max). Formula: Max = Total number of ENIs of the node x H | + | | | | - Number of ENIs bound to a BMS node (B) and number of ENIs being used by pods (U): U + Min < B < U + Max | + | | | | - If the number of pre-bound ENIs on a BMS node is smaller than the minimum allowed, the system will bind more ENIs to make the numbers equal. | + | | | | - If the number of pre-bound ENIs on a BMS node is larger than the maximum allowed, the system periodically unbinds ENIs (about every 2 minutes) to make the numbers equal. | + | | | | - Both the thresholds are one-decimal-place values ranging from 0.0 to 1.0. The low threshold must be smaller than or equal to the high one. | + | | | | - This field can be configured only for BMS nodes in a CCE Turbo cluster. | + | | | | - Pre-binding ENIs can speed up workload creation but occupies IP addresses. | + +-----------------+-----------------+---------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_taint: + +.. table:: **Table 21** Taint + + ========= ========= ====== =========== + Parameter Mandatory Type Description + ========= ========= ====== =========== + key Yes String Key. + value No String Value. + effect Yes String Effect. + ========= ========= ====== =========== + +.. _resetnode__en-us_topic_0000001467713153_request_nodelifecycleconfig: + +.. table:: **Table 22** NodeLifecycleConfig + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=================================================================================================+ + | preInstall | No | String | Pre-installation script. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------+ + | postInstall | No | String | Post-installation script. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be Base64-encoded. (Command: echo -n "Content to be encoded" \| base64) | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------+ + +.. _resetnode__en-us_topic_0000001467713153_request_reinstallextendparam: + +.. table:: **Table 23** ReinstallExtendParam + + +-----------------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+===========+========+==============================================================================================================================================================================================+ + | alpha.cce/NodeImageID | No | String | (Discarded) ID of the user image to run the target OS. Specifying this parameter is equivalent to specifying **imageID** in **ReinstallVolumeSpec**. The original value will be overwritten. | + +-----------------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 24** Response body parameters + + +-----------+--------+-------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+=======================================================================================================+ + | jobid | String | Job ID returned after the job is delivered. The job ID can be used to query the job execution status. | + +-----------+--------+-------------------------------------------------------------------------------------------------------+ + +Example Requests +---------------- + +- Resetting nodes in the default node pool + + .. code-block:: text + + POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/reset + + { + "kind" : "List", + "apiVersion" : "v3", + "nodeList" : [ { + "nodeID" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", + "spec" : { + "name" : "my-ecs-0001", + "os" : "EulerOS 2.5", + "login" : { + "sshKey" : "KeyPair-001" + } + } + } ] + } + +- Reset a node in a node pool (invalid spec). + + .. code-block:: text + + POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/reset + + { + "kind" : "List", + "apiVersion" : "v3", + "nodeList" : [ { + "nodeID" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "spec" : { + "name" : "my-ecs-0001", + "os" : "EulerOS 2.5", + "login" : { + "sshKey" : "KeyPair-001" + } + } + } ] + } + +Example Responses +----------------- + +**Status code: 200** + +The job for resetting a node in a specified cluster is successfully delivered. + +.. code-block:: + + { + "jobid" : "2ec9b78d-9368-46f3-8f29-d1a95622a568" + } + +Status Codes +------------ + ++-------------+--------------------------------------------------------------------------------+ +| Status Code | Description | ++=============+================================================================================+ +| 200 | The job for resetting a node in a specified cluster is successfully delivered. | ++-------------+--------------------------------------------------------------------------------+ + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst index 6c57005..e481bc4 100644 --- a/api-ref/source/change_history.rst +++ b/api-ref/source/change_history.rst @@ -10,7 +10,13 @@ Change History +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Date | Revision | +===================================+============================================================================================================================================================================+ - | 2023-02-10 | Supported clusters of v1.25. | + | 2023-02-10 | - Supported clusters of v1.25. | + | | - Added the **storage** field in :ref:`Table 5 `. | + | | - Added :ref:`Attaching Disks to a Node `. | + | | - Added :ref:`Accepting a Node `. | + | | - Added :ref:`Resetting a Node `. | + | | - Added :ref:`Removing a Node `. | + | | - Added :ref:`Migrating a Node `. | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2022-05-24 | - Supported clusters of v1.23. | | | - Add a note about how to automatically install ICAgent. For details, see :ref:`Creating a Cluster `. | @@ -69,7 +75,7 @@ Change History | | - Updated **spec** in :ref:`Table 3 `. | | | - Added **description** in :ref:`Table 4 `. | | | - Deleted **patchVersion** in :ref:`Table 10 `. | - | | - Added **publicKey** in :ref:`Table 21 `. | + | | - Added **publicKey** in :ref:`Table 28 `. | | | - Added **initialNodeCount** in Table 6. | | | - Added **minNodeCount** in Table 17. | | | - Updated Table 19. | diff --git a/api-ref/source/examples/attaching_disks_to_a_node.rst b/api-ref/source/examples/attaching_disks_to_a_node.rst new file mode 100644 index 0000000..51cb028 --- /dev/null +++ b/api-ref/source/examples/attaching_disks_to_a_node.rst @@ -0,0 +1,385 @@ +:original_name: node_storage_example.html + +.. _node_storage_example: + +Attaching Disks to a Node +========================= + +Challenges +---------- + +In disk planning and striped logical disk creation, it is difficult for users to flexibly attach and partition disks when creating a node. + +During node creation, the **storage** field selects a data disk based on parameters, such as the disk size and disk type, to prevent failures in node creation, resetting, migration, and management caused by drive letter matching failures. + +Solution +-------- + +This section provides details about the **storage** field used in node creation so that you can implement complex disk selection and partitioning by calling the node creation API. + +The **storage** field consists of **storageSelectors** and **storageGroups**. The **storageSelectors** field is responsible for disk selection, and the **storageGroups** field is responsible for disk processing. + +The basic logic for field matching is as follows: + +|image1| + +#. **storageSelectors** selects an EVS disk or a local disk based on the value of **storageType**. + + a. Local disks do not support exact match. All local disks will be selected as data disks. + + If some local disks need to be reserved, occupy the disks in the pre-installation script. The script is similar to the following: + + .. code-block:: + + # prepare + vgName=vg-test + storageDevice=/dev/vdb + # vgcreate + vgcreate ${vgName} ${storageDevice} + + b. EVS disks match the disks created in **dataVolumes** based on the settings of **matchLabels**. + +#. Policies have priorities to match **matchLabels**. The **matchLabels** policy nearest to **storageSelectors** has a higher priority and the disk nearest to **dataVolumes** will be preferentially matches. As **matchLabels** uses loose matching, you are advised to place the **matchLabels** policy with a small matching range on the top. For example: + + |image2| + + a. In step 1, the first disk in **dataVolumes** is matched by the EVS disk whose size is 100 GB and storage class is SAS. In step 2, the second disk in **dataVolumes** is matched by the EVS disk whose size is 100 GB because the first disk has been selected. + b. In step 3, two disks in **dataVolumes** can be matched because **volumeType** or **count** is not specified in **matchLabels**. In this case, no disk is available for matching in step 4. + +#. **storageGroups** associates with **storageSelectors** based on **selectorName**. Finally, two 100 GB disks are selected. The CCE backend groups the two PVs into a volume group (VG) and divides the VG into two logical volumes (LVs) in the ratio of 9:1. 10% of Kubernetes LVs are partitioned in striped mode. 90% runtime LVs are partitioned in linear mode by default because runtimeConfig is not configured. + +Creating a Raw Disk +------------------- + +During node creation on the CCE console, click **Add Data Disk**. Then, click **Expand** next to the newly added data disk and select **Default**. The created disk is a raw disk. + +The following figure shows the API calling logic. + +|image3| + +#. The **cceUse** selector matches a 100 GB data disk. +#. The selected disk is managed by CCE and used as a data disk. +#. The other 100 GB data disk created in **dataVolumes** is not selected by any selector and is managed by storageGroups. Therefore, this EVS disk will be attached to the node as a raw disk and will not be initialized. + +After the node is created, log in to the node and check whether a 100 GB disk has been attached but not initialized. + +|image4| + +The following is an API example: + +.. code-block:: + + { + "kind": "Node", + "apiVersion": "v3", + "metadata": { + "name": "test-83790" + }, + "spec": { + "flavor": "c3.large.2", + "az": "eu-de-01", + "os": "EulerOS 2.9", + "dataVolumes": [ + { + "size": 100, + "volumetype": "SAS" + }, + { + "size": 100, + "volumetype": "SAS" + } + ], + "billingMode": 0, + "extendParam": { + "maxPods": 110 + }, + "nodeNicSpec": { + "primaryNic": { + "subnetId": "ca964acf-8468-4735-8229-97940ef6c881" + } + }, + "rootVolume": { + "size": 50, + "volumetype": "SAS" + }, + "runtime": { + "name": "docker" + }, + "login": { + "userPassword": { + "username": "root", + "password": "JDYkbzhEbE90ckIkY1c0SWJzRy9WeVIzcDFVbC41NFVqa1pxenE0bW9naERlS2RCWEIyWlhqSlpWSjJrL2NmcmdWeE12NGh4T25DeDhlMTdrREVSM2dicHdZNmYzZXh5dy4=" + } + }, + "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 + } + } + +Attaching a Disk to a Specified Path +------------------------------------ + +During node creation on the CCE console, click **Add Data Disk**. Then, click **Expand** next to the newly added data disk, select **Mount Disk**, and set the mount path. In this case, CCE initializes and attaches the disk by default. + +The following figure shows the API calling logic. + +|image5| + +#. The **user1** selector selects a 100 GB data disk. +#. Create a VG named **vguser1** using LVM. +#. Strip all the space of **vguser1** into an LV named **user** and format the disk in ext4 format. Finally, attach the disk to the **/tmp2** directory. + +After the node is created, log in to the node and check whether a 100 GB disk has been attached and managed by LVM. + +|image6| + +The following is an API example. There are two data disks. One is used by CCE, and the other is mounted to the **/tmp2** directory. + +.. code-block:: + + { + "kind": "Node", + "apiVersion": "v3", + "metadata": { + "name": "test-37106" + }, + "spec": { + "flavor": "c3.large.2", + "az": "eu-de-01", + "os": "EulerOS 2.9", + "dataVolumes": [ + { + "size": 100, + "volumetype": "SAS" + }, + { + "size": 100, + "volumetype": "SAS" + } + ], + "billingMode": 0, + "extendParam": { + "maxPods": 110 + }, + "nodeNicSpec": { + "primaryNic": { + "subnetId": "ca964acf-8468-4735-8229-97940ef6c881" + } + }, + "rootVolume": { + "size": 50, + "volumetype": "SAS" + }, + "runtime": { + "name": "docker" + }, + "login": { + "userPassword": { + "username": "root", + "password": "JDYkRmJPckIwRkMkR3RXTkFsNmYvNlAxSDdOTUhYSHZmWjQ0b0ttODRzTDk0L1NzMzRIaHBsQVJkRTZiOGI0WTVJbUtSLlF5aTAuTUpwbGZqdHBTdkYxOU9peGZPV2FUYi4=" + } + }, + "storage": { + "storageSelectors": [ + { + "name": "cceUse", + "storageType": "evs", + "matchLabels": { + "size": "100", + "volumeType": "SAS", + "count": "1" + } + }, + { + "name": "user1", + "storageType": "evs", + "matchLabels": { + "size": "100", + "volumeType": "SAS", + "count": "1" + } + } + ], + "storageGroups": [ + { + "name": "vgpaas", + "selectorNames": [ + "cceUse" + ], + "cceManaged": true, + "virtualSpaces": [ + { + "name": "runtime", + "size": "80%" + }, + { + "name": "kubernetes", + "size": "20%" + } + ] + }, + { + "name": "vguser1", + "selectorNames": [ + "user1" + ], + "virtualSpaces": [ + { + "name": "user", + "size": "100%", + "lvmConfig": { + "lvType": "linear", + "path": "/tmp2" + } + } + ] + } + ] + }, + "count": 1 + } + } + +Creating Striped LVs to Improve Disk Performance +------------------------------------------------ + +Currently, the striped LV function is supported only by calling an API. The following is an example: + +|image7| + +#. **storageSelectors** matches all EVS disks in **dataVolumes** because **matchLables** is not contained in **storageSelectors**. +#. Create a VG named **vgpaas** using LVM. +#. Strip 90% of the **vgpaas** space into runtime LVs. +#. Strip 10% of the **vgpaas** space into Kubernetes LVs. + +.. note:: + + - Two or more data disks are required for striping. + - When creating a striped LV, ensure that the types and sizes of the PVs added to the VG are the same. Otherwise, the striping fails. + +Log in to the node and run the following command to view the striping result: + +|image8| + +The following is an API example: + +.. code-block:: + + { + "kind": "Node", + "apiVersion": "v3", + "metadata": { + "name": "test-83773" + }, + "spec": { + "flavor": "c3.large.2", + "az": "eu-de-01", + "os": "EulerOS 2.9", + "dataVolumes": [ + { + "size": 100, + "volumetype": "SAS" + }, + { + "size": 100, + "volumetype": "SAS" + } + ], + "billingMode": 0, + "extendParam": { + "maxPods": 110 + }, + "nodeNicSpec": { + "primaryNic": { + "subnetId": "ca964acf-8468-4735-8229-97940ef6c881" + } + }, + "rootVolume": { + "size": 50, + "volumetype": "SAS" + }, + "runtime": { + "name": "docker" + }, + "login": { + "userPassword": { + "username": "root", + "password": "JDYkbzhEbE90ckIkY1c0SWJzRy9WeVIzcDFVbC41NFVqa1pxenE0bW9naERlS2RCWEIyWlhqSlpWSjJrL2NmcmdWeE12NGh4T25DeDhlMTdrREVSM2dicHdZNmYzZXh5dy4=" + } + }, + "storage": { + "storageSelectors": [ + { + "name": "cceUse", + "storageType": "evs" + } + ], + "storageGroups": [ + { + "name": "vgpaas", + "selectorNames": [ + "cceUse" + ], + "cceManaged": true, + "virtualSpaces": [ + { + "name": "runtime", + "size": "90%", + "runtimeConfig": { + "lvType": "striped" + } + }, + { + "name": "kubernetes", + "size": "10%", + "lvmConfig": { + "lvType": "striped" + } + } + ] + } + ] + }, + "count": 1 + } + } + +.. |image1| image:: /_static/images/en-us_image_0000001207457192.png +.. |image2| image:: /_static/images/en-us_image_0000001207617538.png +.. |image3| image:: /_static/images/en-us_image_0000001252018205.png +.. |image4| image:: /_static/images/en-us_image_0000001207129076.png +.. |image5| image:: /_static/images/en-us_image_0000001207618830.png +.. |image6| image:: /_static/images/en-us_image_0000001207129902.png +.. |image7| image:: /_static/images/en-us_image_0000001252020583.png +.. |image8| image:: /_static/images/en-us_image_0000001251962373.png diff --git a/api-ref/source/examples/index.rst b/api-ref/source/examples/index.rst new file mode 100644 index 0000000..9debfa4 --- /dev/null +++ b/api-ref/source/examples/index.rst @@ -0,0 +1,14 @@ +:original_name: cce_02_0237.html + +.. _cce_02_0237: + +Examples +======== + +- :ref:`Attaching Disks to a Node ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + attaching_disks_to_a_node diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 3488132..acfd3c5 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -6,6 +6,7 @@ Cloud Container Service - API Reference :maxdepth: 1 api_usage_guidelines + examples/index apis/index kubernetes_apis/index permissions_policies_and_supported_actions