Call the DescribeClusterAttachScripts operation to get the script required to add an existing ECS instance to an ACK cluster as a worker node, or to re-add a removed node to a node pool.
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 ID of the node pool to which the node will be added. Note
If you omit this parameter, the system adds the node to the default node pool. |
np1c9229d9be2d432c93f77a88fca0**** |
| format_disk |
boolean |
No |
Specifies whether to format and mount a data disk for storing containers and images when you add an existing instance to the cluster. Valid values:
Default value: Data mounting rules:
|
false |
| keep_instance_name |
boolean |
No |
Specifies whether to retain the original instance name. If set to
Default value: |
true |
| rds_instances |
array |
No |
A list of RDS instance IDs. If specified, the system automatically adds the IP addresses of the cluster's ECS nodes to the access allowlist of these RDS instances. |
|
|
string |
No |
An RDS instance ID. |
rm-xxx |
|
| arch |
string |
No |
The CPU architecture of the node. Supported architectures include Default value: Note
This parameter is required if the cluster is a managed edge cluster. |
amd64 |
| options |
string |
No |
The node attach options. 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 expiration time of the generated token, specified as a Unix timestamp. For example, the timestamp |
1740037333 |
| one_time_token |
boolean |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
string |
The node attach 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.