To manually add existing ECS instances to an ACK cluster as worker nodes or add nodes back to a node pool, call the DescribeClusterAttachScripts operation to obtain the required attachment script.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:DescribeClusterAttachScripts |
update |
*Cluster
|
None | None |
Request syntax
POST /clusters/{ClusterId}/attachscript HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
ca375a93a30474552ad2a0ebe183e**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
amd64 |
| nodepool_id |
string |
No |
The node pool ID. You can add the node to a specific node pool. Note
If you do not specify a node pool ID, the node is added to the default node pool. |
np1c9229d9be2d432c93f77a88fca0**** |
| format_disk |
boolean |
No |
Specifies whether to mount a data disk to the instance and store containers and images on the data disk when you manually add an existing instance to the cluster. Valid values:
Default value: Data disk mounting rules:
|
false |
| keep_instance_name |
boolean |
No |
Specifies whether to retain the instance name when the instance is added to the cluster. If you do not retain the instance name, the system renames the instance to use the
Default value: |
true |
| rds_instances |
array |
No |
If you specify a list of RDS instances, the system automatically adds the ECS instances of the cluster nodes to the access whitelists of the specified RDS instances. |
|
|
string |
No |
The ID of the RDS instance. |
rm-xxx |
|
| arch |
string |
No |
The CPU architecture of the node. Supported CPU architectures include Default value: Note
This parameter is required if the cluster is a managed edge cluster. |
amd64 |
| options |
string |
No |
The configuration parameters for node attachment. Note
This parameter is required if the cluster is a managed edge cluster. |
{"enableIptables": true,"manageRuntime": true,"quiet": true,"allowedClusterAddons": ["kube-proxy","flannel","coredns"]} |
| expired |
integer |
No |
The Unix timestamp that indicates when the generated token expires. For example, the timestamp 1739980800 corresponds to 00:00:00 on February 20, 2025 (UTC). |
1740037333 |
| one_time_token |
boolean |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
string |
The node attachment script. |
"wget http://***.oss-cn-hangzhou.aliyuncs.com/***" |
Examples
Success response
JSON format
"\"wget http://***.oss-cn-hangzhou.aliyuncs.com/***\""
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.