Removes nodes from a node pool.
Operation description
- When you remove a node, the pods on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
- The operation may have unexpected risks. Back up the data before you perform this operation.
- Nodes remain in the Unschedulable state when they are being removed.
- The system removes only worker nodes. It does not remove master nodes.
- Even if you set the
release_node
parameter totrue
, subscription nodes are not released. You must release the subscription nodes in the ECS console after you remove the nodes.
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:RemoveNodePoolNodes | update | *Cluster acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId} |
| none |
Request syntax
DELETE /clusters/{ClusterId}/nodepools/{NodepoolId}/nodes HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The ID of the cluster. | c23421cfa74454bc8b37163fd19af**** |
NodepoolId | string | Yes | The node pool ID. | np97de2cfb1ba042398dd8f5504c94**** |
release_node | boolean | No | Specifies whether to release the nodes after they are removed. Valid values:
| true |
drain_node | boolean | No | Specifies whether to drain the nodes that you want to remove. Valid values:
| true |
nodesdeprecated | array | No | This parameter is deprecated. A list of nodes that you want to remove. Note
This parameter is deprecated. Use instance_ids instead.
| |
string | No | The node name. | cn-hangzhou.172.16.xxx.xxx | |
instance_ids | array | No | A list of instances that you want to remove. | |
string | No | The ID of the instance that you want to remove. | i-bp1c70fqbv1nlu9xxxxx | |
concurrency | boolean | No | Whether to remove concurrently. | false |
Response parameters
Examples
Sample success responses
JSON
format
{
"request_id": "A9891419-D125-4D89-AFCA-68846675E2F7",
"task_id": "T-62a944794ee141074400****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-19 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-12-15 | The request parameters of the API has changed | View Change Details |
2023-07-21 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-09-21 | Add Operation | View Change Details |