Adds existing nodes to a specific node pool. You can add existing ECS instances to a specific node pool in a Container Service for Kubernetes (ACK) cluster as worker nodes. You can also add removed worker nodes back to the node pool.
Debugging
Authorization information
Request syntax
POST /clusters/{ClusterId}/nodepools/{NodepoolId}/attach HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ClusterId | string | Yes | The cluster ID. | c82e6987e2961451182edacd74faf**** |
| NodepoolId | string | Yes | The node pool ID. | np31da1b38983f4511b490fc62108a**** |
| body | object | No | The request body. | |
| instances | array | No | The IDs of the instances to be added. | |
| string | No | The ID of the instance to be added. | i-2zed0sswuau6o89b**** | |
| password | string | No | The SSH password that is used to log on to the instance. | Hello1234 |
| format_disk | boolean | No | Specifies whether to store container data and images on data disks. Valid values:
Default value: How to mount a data disk:
Note
If you choose to store container data and images on a data disk and the data disk is already mounted to the ECS instance, the existing data on the data disk will be cleared. You can back up the disk to avoid data loss.
| false |
| keep_instance_name | boolean | No | Specifies whether to retain the instance name. Valid values:
Default value: | true |
Response parameters
Examples
Sample success responses
JSONformat
{
"request_id": "D7631D83-6E98-1949-B665-766A62xxxxxx",
"task_id": "T-5a54309c80282e39ea00002f"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-07-21 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
