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..092c7ee --- /dev/null +++ b/api-ref/source/apis/cluster_management/accepting_a_node.rst @@ -0,0 +1,513 @@ +: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. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | Nodes must have 2-core or higher CPU, 4 GB or larger memory. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+-----------------------------------------------------------------+ + +.. _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. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + | userPassword | No | String | Password used for node login. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This field is not supported for the current version. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + +.. _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**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - docker | + | | | | - containerd | + +-----------------+-----------------+-----------------+--------------------------------------------+ + +.. _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_cluster.rst b/api-ref/source/apis/cluster_management/creating_a_cluster.rst index 452334b..821e3cf 100644 --- a/api-ref/source/apis/cluster_management/creating_a_cluster.rst +++ b/api-ref/source/apis/cluster_management/creating_a_cluster.rst @@ -13,7 +13,7 @@ This API is used to create an empty cluster, which has only master nodes but do .. 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. - - Info collect agent (ICAgent) is an O&M data collection agent used by Application Performance Management (APM) service. It runs on each server to collect data from probes in real time. When this API is called to create a cluster, ICAgent is not installed by default. To automatically install ICAgent during cluster creation, add **"cluster.install.addons.external/install": "[{\\"addonTemplateName\\":\\"icagent\\"}]"** to the **annotations** field in the request body. + - Info collect agent (ICAgent) is an O&M data collection agent. It runs on each server to collect data from probes in real time. When this API is called to create a cluster, ICAgent is not installed by default. To automatically install ICAgent during cluster creation, add **"cluster.install.addons.external/install": "[{\\"addonTemplateName\\":\\"icagent\\"}]"** to the **annotations** field in the request body. - Before creating a cluster, :ref:`Creating a VPC and Subnet `. If a VPC and subnet already exists, you do not need to create them again. - By default, an account can create a maximum of five clusters in each region. 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..f29c421 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,149 @@ 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. | + | | | | - Nodes must have 2-core or higher CPU, 4 GB or larger memory. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | az | Yes | String | AZ of the node. For details, see the description of the **availability_zone** parameter in `Creating an ECS `__. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | os | No | String | Node OS. | + | | | | | + | | | | - Nodes in clusters of Kubernetes v1.11 or earlier support EulerOS 2.2. | + | | | | - Nodes in clusters of Kubernetes v1.13 or v1.15 support EulerOS 2.5. | + | | | | - Nodes in clusters of Kubernetes v1.17 support EulerOS 2.5 and CentOS 7.7. | + | | | | - Nodes in clusters of Kubernetes v1.19, v1.21 or v1.23 support EulerOS 2.5, EulerOS 2.9 and CentOS 7.7. | + | | | | - Nodes using **kata** runtime in CCE Turbo cluster support EulerOS 2.9. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | If the **alpha.cce/NodeImageID** parameter in **extendParam** is specified during node creation, you do not need to set this field. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dedicatedHostId | No | String | ID of the dedicated host to which nodes will be scheduled. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | login | Yes | :ref:`login ` object | Node login mode, which can be key pair or password. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rootVolume | Yes | :ref:`Volume ` object | System disk parameters of the node. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dataVolumes | Yes | Array of :ref:`Volume ` object | Data disk parameters of the node. Currently, you can add the second data disk for your node on the CCE console. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | storage | No | :ref:`Storage ` object | Disk initialization management parameter. | + | | | | | + | | | | This parameter is complex to configure. For details, see :ref:`Attaching Disks to a Node `. | + | | | | | + | | | | If this parameter retains its default, disks are managed based on the DockerLVMConfigOverride (discarded) parameter in extendParam. This parameter is supported by clusters of version 1.15.11 and later. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | If a node specification involves local disks and EVS disks at the same time, do not retain the default value of this parameter to prevent unexpected disk partitions. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicIP | No | :ref:`publicIP ` object | EIP used by the node to access public networks. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | billingMode | No | Integer | Billing mode of a node. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This field is not supported for the current version. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | count | Yes | Integer | Number of nodes to be created in a batch. The value must be a positive integer greater than or equal to 1 and less than or equal to the defined limit. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This fielder can be set to **0** for a node pool. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nodeNicSpec | No | :ref:`nodeNicSpec ` object | Description about the node NIC. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extendParam | No | :ref:`extendParam ` object | Extended parameter. Format: Key-value pair. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | userTags | No | Object | Tag of a VM. | + | | | | | + | | | | The format is key-value pair. The number of key-value pairs cannot exceed 20. | + | | | | | + | | | | - **Key**: Only letters, digits, hyphens (-), underscores (_), and at signs (@) are supported. | + | | | | - **Value**: Only letters, digits, hyphens (-), underscores (_), and at signs (@) are supported. | + | | | | | + | | | | Example: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "userTags": [ | + | | | | { | + | | | | "key": "tag1", | + | | | | "value": "aaaa" | + | | | | }, | + | | | | { | + | | | | "key": "tag2", | + | | | | "value": "bbbb" | + | | | | } | + | | | | ] | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | k8sTags | No | Object | Tag of a Kubernetes node. | + | | | | | + | | | | The format is key-value pair. The number of key-value pairs cannot exceed 20. | + | | | | | + | | | | - **Key**: Enter 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key and contain a maximum of 253 characters. Example DNS subdomain: example.com/my-key | + | | | | - **Value**: The value can be left blank or a string of 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed in the character string. | + | | | | | + | | | | Example: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "k8sTags": { | + | | | | "key": "value" | + | | | | } | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | taints | No | Object | You can add taints to created nodes to configure anti-affinity. Each taint contains the following parameters: | + | | | | | + | | | | - **Key**: A key must contain 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain name can be used as the prefix of a key. | + | | | | - **Value**: A value must start with a letter or digit and can contain a maximum of 63 characters, including letters, digits, hyphens (-), underscores (_), and periods (.). | + | | | | - **Effect**: Available options are **NoSchedule**, **PreferNoSchedule**, and **NoExecute**. | + | | | | | + | | | | Example: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "taints": [{ | + | | | | "key": "status", | + | | | | "value": "unavailable", | + | | | | "effect": "NoSchedule" | + | | | | }, { | + | | | | "key": "looks", | + | | | | "value": "bad", | + | | | | "effect": "NoSchedule" | + | | | | }] | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ecsGroupId | No | String | ECS group ID. If this parameter is specified, the node is created in the specified ECS group. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is not supported when you add a node to a node pool or use CCE Turbo cluster. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dedicatedHostId | No | String | ID of the DeH host. If this parameter is specified, the node is scheduled to its own DeH host. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is not supported when you add a node to a node pool. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offloadNode | No | Boolean | Whether the node belongs to a CCE Turbo cluster. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is not supported when you add a node to a node pool. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | faultDomain | No | String | Cloud server fault domain. The node is created in the fault domain specified by this parameter. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | You must specify the ECS to which the fault domain policy applies and enable the fault domain feature. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | No | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table322873620312: @@ -282,44 +293,44 @@ Request .. table:: **Table 8** Data structure of the extendParam field - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=========================+=================+=================+=================================================================================================================+ - | maxPods | No | Integer | Maximum number of pods on the node. | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | agency_name | No | String | Specifies the IAM agency name. | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | dockerBaseSize | No | Integer | Available disk space of a single Docker container on the node using the device mapper. | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | alpha.cce/preInstall | No | String | Script required before the installation. | - | | | | | - | | | | .. note:: | - | | | | | - | | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | alpha.cce/postInstall | No | String | Script required after the installation. | - | | | | | - | | | | .. note:: | - | | | | | - | | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | alpha.cce/NodeImageID | No | String | Mandatory if a custom image is used in creating a bare metal node. | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ - | DockerLVMConfigOverride | No | String | ConfigMap of the Docker data disk. The following is an example configuration: | - | | | | | - | | | | .. code-block:: | - | | | | | - | | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | - | | | | | - | | | | In this example: | - | | | | | - | | | | - **userLV**: size of the user space, for example, **vgpaas/20%VG**. | - | | | | - **userPath**: mount path of the user space, for example, **/home/wqt-test**. | - | | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | - | | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | - | | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | - | | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | - +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=========================+=================+=================+========================================================================================================================================================+ + | maxPods | No | Integer | Maximum number of pods on the node. | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | agency_name | No | String | Specifies the IAM agency name. | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dockerBaseSize | No | Integer | Available disk space of a single Docker container on the node using the device mapper. | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/preInstall | No | String | Script required before the installation. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/postInstall | No | String | Script required after the installation. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/NodeImageID | No | String | Mandatory if a custom image is used in creating a bare metal node. | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | DockerLVMConfigOverride | No | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.)The following is an example configuration: | + | | | | | + | | | | .. code-block:: | + | | | | | + | | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | | + | | | | In this example: | + | | | | | + | | | | - **userLV**: size of the user space, for example, **vgpaas/20%VG**. | + | | | | - **userPath**: mount path of the user space, for example, **/home/wqt-test**. | + | | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | + | | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | + | | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | + | | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | + +-------------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table10946114617286: @@ -457,6 +468,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: @@ -476,7 +593,7 @@ CCE cluster: } }, "spec": { - "flavor": "s1.medium", + "flavor": "c4.large.2", "az": "eu-de-01", "login": { "sshKey": "Keypair-demo" @@ -485,12 +602,42 @@ CCE cluster: "size": 40, "volumetype": "SAS" }, - "dataVolumes": [ - { - "size": 100, - "volumetype": "SAS" - } - ], + "dataVolumes" : [ { + "size" : 100, + "volumetype" : "SAS" + } ], + "storage": { + "storageSelectors": [ + { + "name": "cceUse", + "storageType": "evs", + "matchLabels": { + "size": "100", + "volumeType": "SAS", + "count": "1" + } + } + ], + "storageGroups": [ + { + "name": "vgpaas", + "selectorNames": [ + "cceUse" + ], + "cceManaged": true, + "virtualSpaces": [ + { + "name": "runtime", + "size": "90%" + }, + { + "name": "kubernetes", + "size": "10%" + } + ] + } + ] + }, "userTags": [ { "key": "tag1", @@ -559,6 +706,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 +749,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 +771,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 +815,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 +838,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 +952,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 +964,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,58 +978,58 @@ 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 | - +=========================+=======================+=================================================================================================================+ - | chargingMode | Integer | Billing mode of a node. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | ecs:performancetype | String | Type of the ECS specifications. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | orderID | String | Order ID. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | productID | String | Product ID. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | publicKey | String | Key pair used to log in to the node. Used when creating a key pair. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | maxPods | Integer | Maximum number of pods on the node. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | dockerBaseSize | Integer | Available disk space of a single Docker container on the node using the device mapper. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | agency_name | String | Specifies the IAM agency name. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | DockerLVMConfigOverride | String | Docker data disk configurations. The following is the default configuration: | - | | | | - | | | .. code-block:: | - | | | | - | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | - | | | | - | | | The configuration contains the following fields: | - | | | | - | | | - **userLV**: size of the user space, for example: **vgpaas/20%VG**. | - | | | - **userPath**: mount path of the user space, for example: **/home/wqt-test**. | - | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | - | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | - | | | - **dockerThinpool**: Docker disk space, for example: **vgpaas/60%VG**. | - | | | - **kubernetesLV**: kubelet size, for example: **vgpaas/20%VG**. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+==========================================================================================================================================================+ + | chargingMode | Integer | Billing mode of a node. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ecs:performancetype | String | Type of the ECS specifications. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | orderID | String | Order ID. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | productID | String | Product ID. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicKey | String | Key pair used to log in to the node. Used when creating a key pair. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | maxPods | Integer | Maximum number of pods on the node. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dockerBaseSize | Integer | Available disk space of a single Docker container on the node using the device mapper. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | agency_name | String | Specifies the IAM agency name. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | DockerLVMConfigOverride | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.) The following is the default configuration: | + | | | | + | | | .. code-block:: | + | | | | + | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | + | | | The configuration contains the following fields: | + | | | | + | | | - **userLV**: size of the user space, for example: **vgpaas/20%VG**. | + | | | - **userPath**: mount path of the user space, for example: **/home/wqt-test**. | + | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | + | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | + | | | - **dockerThinpool**: Docker disk space, for example: **vgpaas/60%VG**. | + | | | - **kubernetesLV**: kubelet size, for example: **vgpaas/20%VG**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0242__table9637161310338: -.. table:: **Table 22** Data structure of the **status** field +.. table:: **Table 29** Data structure of the **status** field +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -865,7 +1054,7 @@ Response .. _cce_02_0242__table483064395515: -.. table:: **Table 23** Runtime +.. table:: **Table 30** Runtime +-----------------------+-----------------------+-----------------------------------------------------+ | Parameter | Type | Description | @@ -878,6 +1067,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:: @@ -912,6 +1207,38 @@ Response "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": { @@ -971,6 +1298,38 @@ CCE Turbo cluster: "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 +1346,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/creating_a_node_pool.rst b/api-ref/source/apis/cluster_management/creating_a_node_pool.rst index 6632f3e..699cfdf 100644 --- a/api-ref/source/apis/cluster_management/creating_a_node_pool.rst +++ b/api-ref/source/apis/cluster_management/creating_a_node_pool.rst @@ -113,104 +113,116 @@ Request .. table:: **Table 6** Data structure of the **nodeTemplate** 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 | - 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. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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. This field can be set to **0** for a node pool. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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" | - | | | | }] | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | nodeNicSpec | No | :ref:`nodeNicSpec ` object | Description about the node NIC. | - +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 | - 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. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. This field can be set to **0** for a node pool. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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" | + | | | | }] | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nodeNicSpec | No | :ref:`nodeNicSpec ` object | Description about the node NIC. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | No | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0354__table10946114617286: @@ -364,7 +376,7 @@ Request +-------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | alpha.cce/NodeImageID | No | String | Mandatory if a custom image is used in creating a bare metal node. | +-------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | DockerLVMConfigOverride | No | String | ConfigMap of the Docker data disk. The following is an example configuration: | + | DockerLVMConfigOverride | No | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.)The following is an example configuration: | | | | | | | | | | .. code-block:: | | | | | | @@ -462,6 +474,127 @@ Request | serverGroupReference | No | String | ECS group ID. If this parameter is specified, all nodes in the node pool will be created in this ECS group. | +----------------------+-----------+--------+-------------------------------------------------------------------------------------------------------------+ +.. _cce_02_0354__table163721555105015: + +.. table:: **Table 18** Runtime + + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=====================================================+ + | name | No | String | Container runtime. The default value is **docker**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - docker | + | | | | - containerd | + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + +.. _cce_02_0354__en-us_topic_0000001417516392_request_storage: + +.. table:: **Table 19** 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_0354__en-us_topic_0000001417516392_request_storageselectors: + +.. table:: **Table 20** 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_0354__en-us_topic_0000001417516392_request_matchlabels: + +.. table:: **Table 21** 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_0354__en-us_topic_0000001417516392_request_storagegroups: + +.. table:: **Table 22** 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_0354__en-us_topic_0000001417516392_request_virtualspace: + +.. table:: **Table 23** 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_0354__en-us_topic_0000001417516392_request_lvmconfig: + +.. table:: **Table 24** 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_0354__en-us_topic_0000001417516392_request_runtimeconfig: + +.. table:: **Table 25** 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: @@ -595,11 +728,11 @@ Response **Response parameters:** -:ref:`Table 18 ` describes the response parameters. +:ref:`Table 26 ` describes the response parameters. .. _cce_02_0354__table835415466262: -.. table:: **Table 18** Response parameters +.. table:: **Table 26** Response parameters +------------+------------------------------------------------------------+-----------------------------------------------+ | Parameter | Type | Description | @@ -617,7 +750,7 @@ Response .. _cce_02_0354__table173551146152616: -.. table:: **Table 19** Data structure of the metadata field +.. table:: **Table 27** Data structure of the metadata field ========= ====== ====================== Parameter Type Description @@ -628,7 +761,7 @@ Response .. _cce_02_0354__table1735515465260: -.. table:: **Table 20** Data structure of the spec field +.. table:: **Table 28** Data structure of the spec field +------------------+----------------------------------------------------------------+----------------------------------------------------+ | Parameter | Type | Description | @@ -646,7 +779,7 @@ Response .. _cce_02_0354__table14356154632610: -.. table:: **Table 21** Data structure of the autoscaling field +.. table:: **Table 29** Data structure of the autoscaling field +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -672,7 +805,7 @@ Response .. _cce_02_0354__table1778609171919: -.. table:: **Table 22** Data structure of the nodeManagement field +.. table:: **Table 30** Data structure of the nodeManagement field +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | @@ -682,7 +815,7 @@ Response .. _cce_02_0354__table19851129411: -.. table:: **Table 23** Data structure of the status field +.. table:: **Table 31** Data structure of the status field +-----------------------+-----------------------+---------------------------------------------------------------+ | Parameter | Type | Description | @@ -753,6 +886,41 @@ CCE cluster: } } ], + "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%" + } + ] + } + ] + }, + "runtime": { + "name":"docker" + }, "publicIP": { "eip": { "bandwidth": {} @@ -851,6 +1019,38 @@ CCE Turbo cluster: "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%" + } + ] + } + ] + }, "runtime": { "name":"containerd" }, @@ -867,11 +1067,11 @@ CCE Turbo cluster: Status Code ----------- -:ref:`Table 24 ` describes the status code of this API. +:ref:`Table 32 ` describes the status code of this API. .. _cce_02_0354__zh-cn_topic_0079614900_table46761928: -.. table:: **Table 24** Status code +.. table:: **Table 32** Status code +-------------+-------------------------------------------------------------------------------+ | Status Code | Description | diff --git a/api-ref/source/apis/cluster_management/deleting_a_node.rst b/api-ref/source/apis/cluster_management/deleting_a_node.rst index fde312e..376266a 100644 --- a/api-ref/source/apis/cluster_management/deleting_a_node.rst +++ b/api-ref/source/apis/cluster_management/deleting_a_node.rst @@ -160,6 +160,38 @@ Response "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": { "eip": { "bandwidth": {} diff --git a/api-ref/source/apis/cluster_management/deleting_a_node_pool.rst b/api-ref/source/apis/cluster_management/deleting_a_node_pool.rst index fdb68a7..be410b9 100644 --- a/api-ref/source/apis/cluster_management/deleting_a_node_pool.rst +++ b/api-ref/source/apis/cluster_management/deleting_a_node_pool.rst @@ -152,6 +152,16 @@ Response +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dataVolumes | Array of :ref:`Volume ` objects | Data disk parameters of the node. Currently, you can add the second data disk for your node on the CCE console. | +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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:`V3NodePublicIP ` object | EIP of the node. | +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | nodeNicSpec | :ref:`NodeNicSpec ` object | NIC information of the node. | @@ -221,7 +231,7 @@ Response | | | - **productID**: product ID. | | | | - **maxPods**: 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 fpr managing too many pods. | | | | | - | | | - **DockerLVMConfigOverride**: Docker data disk configurations. The following is an example default configuration: | + | | | - **DockerLVMConfigOverride**: Docker data disk configuration item. (This parameter has been discarded. Use the storage field instead.) The following is an example default configuration: | | | | | | | | .. code-block:: | | | | | @@ -258,6 +268,8 @@ Response | | | | | | | - **alpha.cce/NodeImageID**: This field is required when a custom image is used to create a BMS node. | +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | + +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0357__response_login: @@ -511,121 +523,126 @@ Response | jobId | String | ID of the job to delete the node pool. | +-----------------------+-----------------------+----------------------------------------------------------------------------+ -**Response example**: +.. _cce_02_0357__table163721555105015: -.. code-block:: +.. table:: **Table 20** Runtime - { - "kind": "List", - "apiVersion": "v3", - "items": [ - { - "kind": "NodePool", - "apiVersion": "v3", - "metadata": { - "name": "nodepool-name-change", - "uid": "feec6013-cd7e-11ea-8c7a-0255ac100be7" - }, - "spec": { - "initialNodeCount": 0, - "type": "vm", - "nodeTemplate": { - "flavor": "s6.large.2", - "az": "eu-de-02", - "os": "EulerOS 2.5", - "login": { - "sshKey": "KeyPair-nodepool", - "userPassword": {} - }, - "rootVolume": { - "volumetype": "SAS", - "size": 40 - }, - "dataVolumes": [ - { - "volumetype": "SAS", - "size": 100, - "extendParam": { - "useType": "docker" - } - } - ], - "publicIP": { - "eip": { - "bandwidth": {} - } - }, - "nodeNicSpec": { - "primaryNic": { - "subnetId": "31be174a-0c7f-4b71-bb0d-d325fecb90ef" - } - }, - "billingMode": 0, - "taints": [ - { - "key": "change-taints", - "value": "value1", - "effect": "NoExecute" - } - ], - "k8sTags": { - "cce.cloud.com/cce-nodepool": "nodepool-name-change", - "change-tag": "value2" - }, - "userTags": [ - { - "key": "change-resource-tag", - "value": "value3" - } - ], - "extendParam": { - "DockerLVMConfigOverride": "dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear", - "alpha.cce/NodeImageID": "85bd7ec5-bca4-4f5f-947b-6c1bf02599d3", - "alpha.cce/postInstall": "bHMgLWwK", - "alpha.cce/preInstall": "bHMgLWw=", - "maxPods": 110 - } - }, - "autoscaling": { - "enable": true, - "minNodeCount": 2, - "maxNodeCount": 4, - "scaleDownCooldownTime": 10, - "priority": 2 - }, - "nodeManagement": { - "serverGroupReference": "2129f95a-f233-4cd8-a1b2-9c0acdf918d3" - } - }, - "status": { - "currentNode": 0, - "phase": "" - } - } - ] - } + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=====================================================+ + | name | No | String | Container runtime. The default value is **docker**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - docker | + | | | | - containerd | + +-----------------+-----------------+-----------------+-----------------------------------------------------+ -Status Code +.. _cce_02_0357__response_storage: -:ref:`Table 20 ` describes the status code of this API. +.. table:: **Table 21** Storage -.. _cce_02_0357__en-us_topic_0079614900_table46761928: + +------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ + | 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. | + +------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ -.. table:: **Table 20** Status code +.. _cce_02_0357__response_storageselectors: - +-------------+---------------------------------------------------------------------------+ - | Status Code | Description | - +=============+===========================================================================+ - | 200 | Information about all node pools in the cluster is successfully obtained. | - +-------------+---------------------------------------------------------------------------+ +.. table:: **Table 22** StorageSelectors -For details about error status codes, see :ref:`Status Code `. + +-------------+---------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + +-------------+---------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -Error Codes +.. _cce_02_0357__response_matchlabels: -See :ref:`Error Codes `. +.. table:: **Table 23** matchLabels -For details about the response parameters, see :ref:`Table 18 `. + +-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+ + | 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_0357__response_storagegroups: + +.. table:: **Table 24** 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_0357__response_virtualspace: + +.. table:: **Table 25** 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_0357__response_lvmconfig: + +.. table:: **Table 26** 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_0357__response_runtimeconfig: + +.. table:: **Table 27** 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:** @@ -666,6 +683,41 @@ For details about the response parameters, see :ref:`Table 18 ` describes the status code of this API. +:ref:`Table 28 ` describes the status code of this API. .. _cce_02_0357__zh-cn_topic_0079614900_table46761928: -.. table:: **Table 21** Status code +.. table:: **Table 28** 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/listing_all_node_pools_in_a_specified_cluster.rst b/api-ref/source/apis/cluster_management/listing_all_node_pools_in_a_specified_cluster.rst index 527ee1e..22f9edc 100644 --- a/api-ref/source/apis/cluster_management/listing_all_node_pools_in_a_specified_cluster.rst +++ b/api-ref/source/apis/cluster_management/listing_all_node_pools_in_a_specified_cluster.rst @@ -187,6 +187,16 @@ Response +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dataVolumes | Array of :ref:`Volume ` objects | Data disk parameters of the node. Currently, you can add the second data disk for your node on the CCE console. | +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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:`V3NodePublicIP ` object | EIP of the node. | +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | nodeNicSpec | :ref:`NodeNicSpec ` object | NIC information of the node. | @@ -256,7 +266,7 @@ Response | | | - **productID**: product ID. | | | | - **maxPods**: 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 fpr managing too many pods. | | | | | - | | | - **DockerLVMConfigOverride**: Docker data disk configurations. The following is an example default configuration: | + | | | - **DockerLVMConfigOverride**: Docker data disk configuration item. (This parameter has been discarded. Use the storage field instead.) The following is an example default configuration: | | | | | | | | .. code-block:: | | | | | @@ -293,6 +303,8 @@ Response | | | | | | | - **alpha.cce/NodeImageID**: This field is required when a custom image is used to create a BMS node. | +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | + +-----------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0269__response_login: @@ -546,6 +558,127 @@ Response | jobId | String | ID of the job to delete the node pool. | +-----------------------+-----------------------+----------------------------------------------------------------------------+ +.. _cce_02_0269__table163721555105015: + +.. table:: **Table 22** Runtime + + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=====================================================+ + | name | No | String | Container runtime. The default value is **docker**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - docker | + | | | | - containerd | + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + +.. _cce_02_0269__response_storage: + +.. table:: **Table 23** 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_0269__response_storageselectors: + +.. table:: **Table 24** 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_0269__response_matchlabels: + +.. table:: **Table 25** 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_0269__response_storagegroups: + +.. table:: **Table 26** 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_0269__response_virtualspace: + +.. table:: **Table 27** 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_0269__response_lvmconfig: + +.. table:: **Table 28** 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_0269__response_runtimeconfig: + +.. table:: **Table 29** 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. | + +-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + **Response example**: .. code-block:: @@ -585,6 +718,41 @@ Response } } ], + "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%" + } + ] + } + ] + }, + "runtime": { + "name": "docker" + }, "publicIP": { "eip": { "bandwidth": {} @@ -643,11 +811,11 @@ Response Status Code ----------- -:ref:`Table 22 ` describes the status code of this API. +:ref:`Table 30 ` describes the status code of this API. .. _cce_02_0269__en-us_topic_0079614900_table46761928: -.. table:: **Table 22** Status code +.. table:: **Table 30** Status code +-------------+---------------------------------------------------------------------------+ | Status Code | Description | diff --git a/api-ref/source/apis/cluster_management/listing_all_nodes_in_a_cluster.rst b/api-ref/source/apis/cluster_management/listing_all_nodes_in_a_cluster.rst index a83663f..6acb4eb 100644 --- a/api-ref/source/apis/cluster_management/listing_all_nodes_in_a_cluster.rst +++ b/api-ref/source/apis/cluster_management/listing_all_nodes_in_a_cluster.rst @@ -113,6 +113,38 @@ Response "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": { "eip": { "bandwidth": {} 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..0c73a30 --- /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. | + +------------+-----------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + +.. _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. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + | userPassword | No | String | Password used for node login. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This field is not supported for the current version. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_request_nodeitem: + +.. table:: **Table 7** NodeItem + + ========= ========= ====== =========== + Parameter Mandatory Type Description + ========= ========= ====== =========== + uid Yes String Node ID. + ========= ========= ====== =========== + +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 **MigrateNodesTask**. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | spec | :ref:`MigrateNodesSpec ` object | Configuration data. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + | status | :ref:`TaskStatus ` object | Job status. | + +------------+------------------------------------------------------------------------------------------------------+-------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_response_migratenodesspec: + +.. table:: **Table 9** 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 10** 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 11** Login + + +-----------------------+-----------------------+---------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=========================================================+ + | sshKey | String | Name of the key pair used for login. | + +-----------------------+-----------------------+---------------------------------------------------------+ + | userPassword | String | Password used for node login. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-----------------------+-----------------------+---------------------------------------------------------+ + +.. _migratenode__en-us_topic_0000001467833433_response_nodeitem: + +.. table:: **Table 12** NodeItem + + ========= ====== =========== + Parameter Type Description + ========= ====== =========== + uid String Node ID. + ========= ====== =========== + +.. _migratenode__en-us_topic_0000001467833433_response_taskstatus: + +.. table:: **Table 13** 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/querying_a_specified_node_pool.rst b/api-ref/source/apis/cluster_management/querying_a_specified_node_pool.rst index 2da6bc6..c3fb471 100644 --- a/api-ref/source/apis/cluster_management/querying_a_specified_node_pool.rst +++ b/api-ref/source/apis/cluster_management/querying_a_specified_node_pool.rst @@ -173,6 +173,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 used by the node to access public networks. | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | nodeNicSpec | :ref:`nodeNicSpec ` object | Node NIC description. | @@ -248,6 +258,8 @@ Response | | | "effect": "NoSchedule" | | | | }] | +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | runtime | :ref:`Runtime ` object | Container runtime. The default value is **docker**. | + +-----------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0355__table10946114617286: @@ -406,42 +418,42 @@ Response .. table:: **Table 17** Data structure of the spec/extendParam field - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=========================+=======================+=================================================================================================================+ - | maxPods | Integer | Maximum number of pods on the node. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | alpha.cce/preInstall | String | Script required before the installation. | - | | | | - | | | .. note:: | - | | | | - | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | alpha.cce/postInstall | String | Script required after the installation. | - | | | | - | | | .. note:: | - | | | | - | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | alpha.cce/NodeImageID | String | Mandatory if a custom image is used in creating a bare metal node. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | DockerLVMConfigOverride | String | ConfigMap of the Docker data disk. The following is an example configuration: | - | | | | - | | | .. code-block:: | - | | | | - | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | - | | | | - | | | In this example: | - | | | | - | | | - **userLV**: size of the user space, for example, **vgpaas/20%VG**. | - | | | - **userPath**: mount path of the user space, for example, **/home/wqt-test**. | - | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | - | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | - | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | - | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | publicKey | String | Public key of the node. Used when creating a key pair. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+====================================================================================================================================================+ + | maxPods | Integer | Maximum number of pods on the node. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/preInstall | String | Script required before the installation. | + | | | | + | | | .. note:: | + | | | | + | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/postInstall | String | Script required after the installation. | + | | | | + | | | .. note:: | + | | | | + | | | The input value must be encoded using Base64. (Command: **echo -n "Content to be encoded" \| base64**) | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | alpha.cce/NodeImageID | String | Mandatory if a custom image is used in creating a bare metal node. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | DockerLVMConfigOverride | String | Docker data disk configuration item. (This parameter has been discarded. Use the storage field instead.)The following is an example configuration: | + | | | | + | | | .. code-block:: | + | | | | + | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | + | | | In this example: | + | | | | + | | | - **userLV**: size of the user space, for example, **vgpaas/20%VG**. | + | | | - **userPath**: mount path of the user space, for example, **/home/wqt-test**. | + | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | + | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | + | | | - **dockerThinpool**: Docker space size, for example, **vgpaas/60%VG**. | + | | | - **kubernetesLV**: kubelet space size, for example, **vgpaas/20%VG**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicKey | String | Public key of the node. Used when creating a key pair. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0355__table14356154632610: @@ -499,6 +511,127 @@ Response | jobId | String | ID of the job to delete the node pool. | +-----------------------+-----------------------+---------------------------------------------------------------+ +.. _cce_02_0355__table163721555105015: + +.. table:: **Table 21** Runtime + + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=====================================================+ + | name | No | String | Container runtime. The default value is **docker**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - docker | + | | | | - containerd | + +-----------------+-----------------+-----------------+-----------------------------------------------------+ + +.. _cce_02_0355__response_storage: + +.. table:: **Table 22** 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_0355__response_storageselectors: + +.. table:: **Table 23** 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_0355__response_matchlabels: + +.. table:: **Table 24** 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_0355__response_storagegroups: + +.. table:: **Table 25** 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_0355__response_virtualspace: + +.. table:: **Table 26** 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_0355__response_lvmconfig: + +.. table:: **Table 27** 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_0355__response_runtimeconfig: + +.. table:: **Table 28** 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. | + +-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + **Response example**: .. code-block:: @@ -538,6 +671,41 @@ Response } } ], + "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%" + } + ] + } + ] + }, + "runtime": { + "name":"docker" + }, "publicIP": { "eip": { "bandwidth": {} @@ -594,11 +762,11 @@ Response Status Code ----------- -:ref:`Table 21 ` describes the status code of this API. +:ref:`Table 29 ` describes the status code of this API. .. _cce_02_0355__zh-cn_topic_0079614900_table46761928: -.. table:: **Table 21** Status code +.. table:: **Table 29** Status code =========== ================================================ Status Code Description 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..1da72d9 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: @@ -258,69 +268,69 @@ Response .. table:: **Table 11** Data structure of the **extendParam** field - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=========================+=======================+=================================================================================================================+ - | chargingMode | Integer | Billing mode of a node. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | ecs:performancetype | String | Type of the ECS specifications. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | orderID | String | Order ID. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | productID | String | Product ID. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | maxPods | Integer | Maximum number of pods on the node. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | dockerBaseSize | Integer | Available disk space of a single Docker container on the node using the device mapper. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | periodType | String | Purchase duration type. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | periodNum | Integer | Purchase duration. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | isAutoRenew | String | Whether auto renewal is enabled. | - | | | | - | | | - **true**: Indicates that auto renewal is enabled. | - | | | - **false**: Indicates that auto renewal is disabled. | - | | | | - | | | .. note:: | - | | | | - | | | This field is not supported for the current version. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ - | DockerLVMConfigOverride | String | Docker data disk configurations. The following is the default configuration: | - | | | | - | | | .. code-block:: | - | | | | - | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | - | | | | - | | | The configuration contains the following fields: | - | | | | - | | | - **userLV**: size of the user space, for example: **vgpaas/20%VG**. | - | | | - **userPath**: mount path of the user space, for example: **/home/wqt-test**. | - | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | - | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | - | | | - **dockerThinpool**: Docker disk space, for example: **vgpaas/60%VG**. | - | | | - **kubernetesLV**: kubelet size, for example: **vgpaas/20%VG**. | - +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+==========================================================================================================================================================+ + | chargingMode | Integer | Billing mode of a node. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ecs:performancetype | String | Type of the ECS specifications. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | orderID | String | Order ID. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | productID | String | Product ID. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | maxPods | Integer | Maximum number of pods on the node. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dockerBaseSize | Integer | Available disk space of a single Docker container on the node using the device mapper. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | periodType | String | Purchase duration type. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | periodNum | Integer | Purchase duration. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | isAutoRenew | String | Whether auto renewal is enabled. | + | | | | + | | | - **true**: Indicates that auto renewal is enabled. | + | | | - **false**: Indicates that auto renewal is disabled. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | DockerLVMConfigOverride | String | Docker data disk configuration item. (This parameter has been discarded. Use the **storage** field instead.) The following is the default configuration: | + | | | | + | | | .. code-block:: | + | | | | + | | | "DockerLVMConfigOverride":"dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear" | + | | | | + | | | The configuration contains the following fields: | + | | | | + | | | - **userLV**: size of the user space, for example: **vgpaas/20%VG**. | + | | | - **userPath**: mount path of the user space, for example: **/home/wqt-test**. | + | | | - **diskType**: disk type. Currently, only the **evs**, **hdd**, and **ssd** are supported. | + | | | - **lvType**: type of a logic volume. Currently, the value can be **linear** or **striped**. | + | | | - **dockerThinpool**: Docker disk space, for example: **vgpaas/60%VG**. | + | | | - **kubernetesLV**: kubelet size, for example: **vgpaas/20%VG**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _cce_02_0243__table1741714540447: @@ -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:: @@ -378,6 +494,38 @@ Response "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": { "eip": { "bandwidth": {} @@ -395,11 +543,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..7726266 --- /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. | + +------------+-----------+--------------------------------------------------------------------------------------------------+------------------------------------------------------+ + +.. _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. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + | userPassword | No | String | Password used for node login. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This field is not supported for the current version. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + +.. _removenode__en-us_topic_0000001417833320_request_nodeitem: + +.. table:: **Table 6** NodeItem + + ========= ========= ====== =========== + Parameter Mandatory Type Description + ========= ========= ====== =========== + uid Yes String Node ID. + ========= ========= ====== =========== + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 7** 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 8** 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 9** Login + + +-----------------------+-----------------------+---------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=========================================================+ + | sshKey | String | Name of the key pair used for login. | + +-----------------------+-----------------------+---------------------------------------------------------+ + | userPassword | String | Password used for node login. | + | | | | + | | | .. note:: | + | | | | + | | | This field is not supported for the current version. | + +-----------------------+-----------------------+---------------------------------------------------------+ + +.. _removenode__en-us_topic_0000001417833320_response_nodeitem: + +.. table:: **Table 10** NodeItem + + ========= ====== =========== + Parameter Type Description + ========= ====== =========== + uid String Node ID. + ========= ====== =========== + +.. _removenode__en-us_topic_0000001417833320_response_taskstatus: + +.. table:: **Table 11** 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..fc35706 --- /dev/null +++ b/api-ref/source/apis/cluster_management/resetting_a_node.rst @@ -0,0 +1,530 @@ +: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. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + | userPassword | No | String | Password used for node login. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This field is not supported for the current version. | + +-----------------+-----------------+-----------------+---------------------------------------------------------+ + +.. _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**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - docker | + | | | | - containerd | + +-----------------+-----------------+-----------------+--------------------------------------------+ + +.. _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/apis/cluster_management/updating_a_specified_node.rst b/api-ref/source/apis/cluster_management/updating_a_specified_node.rst index d3d3f16..7638f2b 100644 --- a/api-ref/source/apis/cluster_management/updating_a_specified_node.rst +++ b/api-ref/source/apis/cluster_management/updating_a_specified_node.rst @@ -123,6 +123,38 @@ For the description of the response parameters, see :ref:`Table 4 ` object | Metadata of the node pool. | - +------------+-----------+--------------------------------------------------------+-------------------------------------------+ - | spec | Yes | :ref:`spec ` object | Parameters of the node pool. | - +------------+-----------+--------------------------------------------------------+-------------------------------------------+ + +-----------+-----------+--------------------------------------------------------+------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========================================================+==============================+ + | metadata | Yes | :ref:`metadata ` object | Metadata of the node pool. | + +-----------+-----------+--------------------------------------------------------+------------------------------+ + | spec | Yes | :ref:`spec ` object | Parameters of the node pool. | + +-----------+-----------+--------------------------------------------------------+------------------------------+ .. _cce_02_0356__table13456192212: @@ -94,11 +90,6 @@ Request +==================+=================+=====================+=====================================================================================================================================================================================================================================================================================================================================+ | initialNodeCount | Yes | Integer | Expected number of nodes in this node pool. The value cannot be greater than the maximum number of nodes allowed for the cluster. | +------------------+-----------------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | type | No | String | Node pool type. If this parameter is left blank, the value **vm** is used by default. | - | | | | | - | | | | - **vm**: ECS | - | | | | - **ElasticBMS**: BMS. This value is valid in CCE Turbo cluster. | - +------------------+-----------------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | autoscaling | No | autoscaling object | Auto scaling parameters. | +------------------+-----------------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | nodeTemplate | Yes | nodeTemplate object | Parameters of the node pool template. | @@ -176,85 +167,30 @@ Request .. code-block:: { - "kind": "NodePool", - "apiVersion": "v3", - "metadata": { - "name": "nodepool-name-change", - "uid": "feec6013-cd7e-11ea-8c7a-0255ac100be7" + "metadata" : { + "name" : "nodepool-name-change" + }, + "spec" : { + "nodeTemplate" : { + "k8sTags" : { + "cce.cloud.com/cce-nodepool": "nodepool-name-change", + "change-tag": "value2" }, - "spec": { - "initialNodeCount": 0, - "type": "vm", - "nodeTemplate": { - "flavor": "s6.large.2", - "az": "eu-de-01", - "os": "EulerOS 2.5", - "login": { - "sshKey": "KeyPair-nodepool", - "userPassword": {} - }, - "rootVolume": { - "volumetype": "SATA", - "size": 40 - }, - "dataVolumes": [ - { - "volumetype": "SATA", - "size": 100, - "extendParam": { - "useType": "docker" - } - } - ], - "publicIP": { - "eip": { - "bandwidth": {} - } - }, - "nodeNicSpec": { - "primaryNic": { - "subnetId": "31be174a-0c7f-4b71-bb0d-d325fecb90ef" - } - }, - "billingMode": 0, - "taints": [ - { - "key": "change-taints", - "value": "value1", - "effect": "NoExecute" - } - ], - "k8sTags": { - "change-tag": "value2" - }, - "userTags": [ - { - "key": "change-resource-tag", - "value": "value3" - } - ], - "extendParam": { - "DockerLVMConfigOverride": "dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear", - "alpha.cce/postInstall": "bHMgLWwK", - "alpha.cce/preInstall": "bHMgLWw=", - "maxPods": 110 - } - }, - "autoscaling": { - "enable": true, - "minNodeCount": 2, - "maxNodeCount": 4, - "scaleDownCooldownTime": 10, - "priority": 2 - }, - "nodeManagement": { - "serverGroupReference": "2129f95a-f233-4cd8-a1b2-9c0acdf918d3" - } + "taints" : [ { + "key" : "status", + "value" : "unavailable", + "effect" : "NoSchedule" + } ], }, - "status": { - "currentNode": 0, - "phase": "" - } + "autoscaling" : { + "enable" : true, + "minNodeCount" : 2, + "maxNodeCount" : 4, + "scaleDownCooldownTime" : 10, + "priority" : 2 + }, + "initialNodeCount" : 1 + } } Response @@ -262,7 +198,7 @@ Response **Response parameters**: -:ref:`Table 18 ` describes the response parameters. +:ref:`Table 26 ` describes the response parameters. **Response example**: @@ -299,6 +235,41 @@ Response } } ], + "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%" + } + ] + } + ] + }, + "runtime": { + "name":"docker" + }, "publicIP": { "eip": { "bandwidth": {} diff --git a/api-ref/source/appendix/attaching_disks_to_a_node.rst b/api-ref/source/appendix/attaching_disks_to_a_node.rst new file mode 100644 index 0000000..51cb028 --- /dev/null +++ b/api-ref/source/appendix/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/appendix/how_to_use_elb_in_a_cluster.rst b/api-ref/source/appendix/how_to_use_elb_in_a_cluster.rst deleted file mode 100644 index 65871b9..0000000 --- a/api-ref/source/appendix/how_to_use_elb_in_a_cluster.rst +++ /dev/null @@ -1,140 +0,0 @@ -:original_name: cce_02_0087.html - -.. _cce_02_0087: - -How to Use ELB in a Cluster -=========================== - -This section describes how to use the Elastic Load Balancer (ELB) in a cluster created by CCE. - -Procedure ---------- - -Create a Service. - -.. note:: - - Before enabling sticky session, ensure that the following conditions are met: - - - The workload protocol is TCP. - - Anti-affinity has been configured between pods of the workload. That is, all pods of the workload are deployed on different nodes. - -Automatically creating an ELB: - -.. code-block:: - - apiVersion: v1 - kind: Service - metadata: - annotations: - kubernetes.io/elb.class: union - kubernetes.io/session-affinity-mode: SOURCE_IP - kubernetes.io/elb.subnet-id: 5083f225-9bf8-48fa-9c8b-67bd9693c4c0 - kubernetes.io/elb.autocreate: "{\"type\":\"public\",\"bandwidth_name\":\"cce-bandwidth-1551163379627\",\"bandwidth_chargemode\":\"traffic\",\"bandwidth_size\":5,\"bandwidth_sharetype\":\"PER\",\"eip_type\":\"5_bgp\",\"name\":\"james\"}" - labels: - app: nginx - name: nginx - spec: - externalTrafficPolicy: Local - ports: - - name: service0 - port: 80 - protocol: TCP - targetPort: 80 - selector: - app: nginx - type: LoadBalancer - -Using an existing ELB: - -.. code-block:: - - apiVersion: v1 - kind: Service - metadata: - annotations: - kubernetes.io/elb.class: union - kubernetes.io/session-affinity-mode: SOURCE_IP - kubernetes.io/elb.id: 3c7caa5a-a641-4bff-801a-feace27424b6 - kubernetes.io/elb.subnet-id: 5083f225-9bf8-48fa-9c8b-67bd9693c4c0 - labels: - app: nginx - name: nginx - spec: - loadBalancerIP: 10.78.42.242 - externalTrafficPolicy: Local - ports: - - name: service0 - port: 80 - protocol: TCP - targetPort: 80 - selector: - app: nginx - type: LoadBalancer - -.. table:: **Table 1** Key parameters - - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=====================================+=================================================================+==========================================================================================================================================================================================================================================================================================================================+ - | kubernetes.io/elb.class | String | Mandatory and must be set to **union** if an enhanced load balancer is in use. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | kubernetes.io/session-affinity-mode | String | Optional. If sticky session is enabled, add this parameter. | - | | | | - | | | The value **SOURCE_IP** indicates that listeners ensure sticky session based on source IP addresses. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | kubernetes.io/elb.id | String | Optional. This parameter is mandatory if an existing ELB is used. | - | | | | - | | | It indicates the ID of an enhanced load balancer. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | kubernetes.io/elb.subnet-id | String | Optional. This parameter is mandatory only if a load balancer will be automatically created. For clusters of v1.11.7-r0 or later, this parameter can be left unspecified. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | kubernetes.io/elb.autocreate | :ref:`elb.autocreate ` object | Optional. This parameter is mandatory if a public network load balancer will be automatically created. The system will create an enhanced load balancer and an EIP. This parameter is also mandatory if a private network load balancer will be automatically created. The system will create an enhanced load balancer. | - | | | | - | | | **Example:** | - | | | | - | | | - Value for a public network load balancer that is automatically created: "{\\"type\\":\\"public\\",\\"bandwidth_name\\":\\"cce-bandwidth-1551163379627\\",\\"bandwidth_chargemode\\":\\"traffic\\",\\"bandwidth_size\\":5,\\"bandwidth_sharetype\\":\\"PER\\",\\"eip_type\\":\\"5_bgp\\",\\"name\\":\\"james\\"}" | - | | | - Value for a private network load balancer that is automatically created: "{\\"type\\":\\"inner\\"}" | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | loadBalancerIP | String | Private IP address of a private network load balancer or public IP address of a public network load balancer. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | externalTrafficPolicy | String | Optional. If sticky session is enabled, add this parameter so requests are transferred to a fixed node. If a LoadBalancer Service with this parameter set to **Local** is created for a workload, the workload can be accessed only when the client is installed on the same node as the server. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | port | Integer | Access port that is registered on the load balancer and mapped to the cluster-internal IP address. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | targetPort | String | Container port on the CCE console. | - +-------------------------------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -.. _cce_02_0087__table19417184671919: - -.. table:: **Table 2** Data structure of the **elb.autocreate** field - - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=======================+=============================================================================================================================+ - | name | String | Name of the load balancer that is automatically created. | - | | | | - | | | The value is a string of 1 to 64 characters that consist of letters, digits, underscores (_), and hyphens (-). | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | type | String | Network type of the load balancer. | - | | | | - | | | - **public**: public network load balancer. | - | | | - **inner**: private network load balancer. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | bandwidth_name | String | Bandwidth name. The default value is **cce-bandwidth-*****\***. | - | | | | - | | | The value is a string of 1 to 64 characters that consist of letters, digits, underscores (_), hyphens (-), and periods (.). | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | bandwidth_chargemode | String | Bandwidth billing mode. | - | | | | - | | | The value is **traffic**, indicating that the billing is based on traffic. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | bandwidth_size | Integer | Bandwidth size. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | bandwidth_sharetype | String | Bandwidth sharing mode. | - | | | | - | | | - **PER**: dedicated bandwidth. | - | | | - **WHOLE**: shared bandwidth. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | eip_type | String | EIP type. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/appendix/index.rst b/api-ref/source/appendix/index.rst index e0b08ff..474de4f 100644 --- a/api-ref/source/appendix/index.rst +++ b/api-ref/source/appendix/index.rst @@ -11,11 +11,11 @@ Appendix - :ref:`Error Codes ` - :ref:`Obtaining a Project ID ` - :ref:`Obtaining the Account ID ` -- :ref:`How to Use ELB in a Cluster ` - :ref:`How to Obtain Parameters in the API URI ` - :ref:`API Permissions ` - :ref:`Creating a VPC and Subnet ` - :ref:`Creating a Key Pair ` +- :ref:`Attaching Disks to a Node ` .. toctree:: :maxdepth: 1 @@ -27,8 +27,8 @@ Appendix error_codes obtaining_a_project_id obtaining_the_account_id - how_to_use_elb_in_a_cluster how_to_obtain_parameters_in_the_api_uri api_permissions creating_a_vpc_and_subnet creating_a_key_pair + attaching_disks_to_a_node diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst index d18bab5..e481bc4 100644 --- a/api-ref/source/change_history.rst +++ b/api-ref/source/change_history.rst @@ -10,14 +10,21 @@ Change History +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Date | Revision | +===================================+============================================================================================================================================================================+ + | 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 `. | | | - The native APIs of Kubernetes will no longer be maintained. For details, see :ref:`Overview `. | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 2022-03-24 | Supported clusters of v1.21. | - | | | + | 2022-03-24 | - Supported clusters of v1.21. | | | - The cluster certificate SAN can be customized. For details, see **customSan** field in :ref:`Table 5 `. | - | | - Added the **cidrs** field in :ref:`Table 5 `. | + | | - Added the **cidrs** field in :ref:`Table 9 `. | | | - Added :ref:`Quota Management `. | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2022-02-17 | - Supported the creation of CCE Turbo Cluster. | @@ -68,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/kubernetes_apis/overview.rst b/api-ref/source/kubernetes_apis/overview.rst index 5cb43c8..bb55b6d 100644 --- a/api-ref/source/kubernetes_apis/overview.rst +++ b/api-ref/source/kubernetes_apis/overview.rst @@ -15,6 +15,7 @@ To find detailed API definitions for different Kubernetes versions, visit the fo - 1.19: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/ - 1.21: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/ - 1.23: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/ +- 1.25: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/ Based on the open source Kubernetes APIs, CCE enhances and adapts following functions.