Synchronizing Node Configurations in a Node Pool
Function
This API is used to synchronize the configurations of existing nodes in a node pool.
Calling Method
For details, see Calling APIs.
URI
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/operation/upgrade
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Details: Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Project IDs of the account Default value: N/A |
| cluster_id | Yes | String | Details: Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Cluster IDs Default value: N/A |
| nodepool_id | Yes | String | Details: Node pool ID. For details about how to obtain the ID, see How to Obtain Parameters in the API URI. Constraints: None Options: Cluster IDs Default value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Definition Type (or format) of the request body. The default value is application/json. Other values of this field will be provided for specific APIs, if any. Constraints GET requests are not validated. Default Value N/A |
| X-Auth-Token | Yes | String | Details: Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. Constraints: None Options: N/A Default value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| spec | Yes | UpgradeNodePoolSpec object | Definition Parameters in the request for synchronizing nodes in a node pool Constraints N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| maxUnavailable | Yes | Integer | Definition The maximum number of nodes to be synchronized at a time. It also specifies the maximum number of unavailable nodes during node upgrades. When a node is reset for synchronization, the node is unavailable. Set this parameter to a proper value to prevent pod scheduling failures caused by a large number of unavailable nodes in the cluster. Constraints N/A Range 1 to 20 Default Value N/A |
| nodeIDs | No | Array of strings | Definition List of node IDs selected in the node pool to be synchronized. For details about how to obtain the IDs, see How to Obtain Parameters in the API URI. Constraints N/A Range N/A Default Value N/A |
| nodePoolID | Yes | String | Definition Node pool ID. For details about how to obtain the ID, see How to Obtain Parameters in the API URI. Constraints N/A Range N/A Default Value N/A |
| nodeTemplate | No | Definition Template parameters for synchronizing a node pool Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| lifeCycle | Yes | NodeLifecycleConfig object | Definition Customized node lifecycle settings Constraints N/A |
| login | Yes | Login object | Details: Node login mode. Either a key pair or password must be used for login. Constraints: None |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| sshKey | No | String | Details: Name of the key pair used for login Constraints: None Options: N/A Default value: N/A |
| userPassword | No | UserPassword object | Details: Password used for node login Constraints: None |
| removeUserPassword | No | Boolean | Definition Whether to remove the password login setting of a node pool during the node pool update Constraints This parameter is supported only during node pool updates. If it is set to true, no user password can be specified. Range N/A Default Value false |
| removeSSHKey | No | Boolean | Definition Whether to remove the key pair login setting of a node pool during the node pool update Constraints This parameter is supported only during node pool updates. If it is set to true, no SSH key can be specified. Range N/A Default Value false |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| username | No | String | Details: Login account. The default value is root. Constraints: None Options: N/A Default value: root |
| password | Yes | String | Details: Login password. If a username and password are used when a node is created, this field is shielded in the response body. Constraints: The password field must be salted during node creation. For details, see Adding a Salt in the password Field When Creating a Node. Options: A password must:
Default value: N/A |
Response Parameters
Status code: 200
The node pool synchronization has been accepted.
None
Example Requests
-
Synchronize the node configurations in an on-premises node pool.
{ "spec" : { "maxUnavailable" : 1, "nodeIDs" : [ "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "bbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbb" ], "nodePoolID" : "cccccccc-cccc-cccc-cccc-cccccccccccc" } } -
Synchronize the node configurations in the default node pool.
{ "spec" : { "maxUnavailable" : 1, "nodeIDs" : [ "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "bbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbb" ], "nodePoolID" : "DefaultPool", "nodeTemplate" : { "lifeCycle" : { "preInstall" : "ZWNobyAx", "postInstall" : "ZWNobyAx" }, "login" : { "userPassword" : { "password" : "xxxxx", "username" : "root" } } } } }
Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | The node pool synchronization has been accepted. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot