Queries the scripts used to add existing nodes to a Container Service for Kubernetes (ACK) cluster. ACK allows you to manually add existing Elastic Compute Service (ECS) instances to an ACK cluster as worker nodes or re-add worker nodes that you remove from the cluster to a node pool.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:DescribeClusterAttachScripts | update | *Cluster acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId} |
| none |
Request syntax
POST /clusters/{ClusterId}/attachscript HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | ca375a93a30474552ad2a0ebe183e**** |
body | object | No | The request parameters. | |
nodepool_id | string | No | The ID of the node pool to which you want to add an existing node. Note
If you do not specify a node pool ID, the node is added to a default node pool.
| np1c9229d9be2d432c93f77a88fca0**** |
format_disk | boolean | No | Specifies whether to mount data disks to an existing instance when you add the instance to the cluster. You can add data disks to store container data and images. Valid values:
Default value: How a data disk is mounted:
| false |
keep_instance_name | boolean | No | Specifies whether to retain the name of the existing instance when it is added to the cluster. If you do not retain the instance name, the instance is named in the
Default value: | true |
rds_instances | array | No | The ApsaraDB RDS instances. If you specify a list of ApsaraDB RDS instances, ECS instances in the cluster are automatically added to the whitelist of the ApsaraDB RDS instances. | |
string | No | The name of the ApsaraDB RDS instance. | rm-xxx | |
arch | string | No | The CPU architecture of the node. Valid values: Default value: Note
This parameter is required if you want to add the existing node to a Container Service for Kubernetes (ACK) Edge cluster.
| amd64 |
options | string | No | The node configurations for the existing instance that you want to add as a node. Note
This parameter is required if you want to add the existing node to an ACK Edge cluster.
| {\"enableIptables\": true,\"manageRuntime\": true,\"quiet\": true,\"allowedClusterAddons\": [\"kube-proxy\",\"flannel\",\"coredns\"]} |
Response parameters
Examples
Sample success responses
JSON
format
"\"curl http://aliacs-k8s-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/public/pkg/run/attach/1.12.6-aliyunedge.1/edgeadm -O edgeadm; chmod u+x edgeadm; ./edgeadm join --openapi-token=XXX --node-spec=\"{\\\"flannelIface\\\":\\\"eth0\\\",\\\"enableIptables\\\":true,\\\"assumeYes\\\":true,\\\"manageRuntime\\\":true,\\\"nodeNameStrategy\\\":\\\"hostname\\\",\\\"enabledAddons\\\":[\\\"kube-proxy\\\",\\\"flannel\\\",\\\"coredns\\\"]}\"\""
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-25 | The internal configuration of the API is changed, but the call is not affected | View Change Details |