Removes nodes from a Container Service for Kubernetes (ACK) cluster. When you remove nodes, you can specify whether to release the Elastic Compute Service (ECS) instances and drain the nodes. When you remove nodes, pods on the nodes are migrated. This may adversely affect your businesses. We recommend that you back up data and perform this operation during off-peak hours.
Operation description
- When you remove a node, the pods that run 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.
- When the system removes a node, it sets the status of the node to Unschedulable.
- The system removes only worker nodes. It does not remove master 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:DeleteClusterNodes | delete |
|
| none |
Request syntax
POST /clusters/{ClusterId}/nodes HTTP/1.1
DELETE /clusters/{ClusterId}/nodes HTTP/1.1
POST /clusters/{ClusterId}/nodes HTTP/1.1
DELETE /clusters/{ClusterId}/nodes HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | c850429a2287b4d968e27e87a4921**** |
body | object | No | The request body. | |
drain_node | boolean | No | Specifies whether to remove all pods from the nodes that you want to remove. Valid values:
Default value: | true |
release_node | boolean | No | Specifies whether to release the Elastic Compute Service (ECS) instances. Valid values:
Default value: Note
You cannot release subscription ECS instances.
| true |
nodes | array | Yes | The list of nodes to be removed. You need to specify the name of the nodes used in the cluster, for example, | |
string | No | The node name. | cn-chengdu.192.168.0.70 |
Response parameters
Examples
Sample success responses
JSON
format
{
"cluster_id": "c104d5d5f301c4e2a8ee578c37bc****",
"request_id": "A9891419-D125-4D89-AFCA-68846675E2F7",
"task_id": "T-60fea8ad2e277f0879000ae9"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|