All Products
Search
Document Center

Container Service for Kubernetes:RemoveNodePoolNodes

Last Updated:Nov 02, 2026

Removes nodes from a node pool in a cluster and adjusts the expected number of nodes when the nodes are no longer needed. When removing nodes, you can specify whether to release the ECS instances and whether to automatically drain the nodes. Removing nodes involves pod migration, which may affect your services. Perform this operation during off-peak hours and back up your data in advance.

Operation description

  • Removing nodes involves pod migration, which may affect your services. Perform this operation during off-peak hours.

  • Unexpected risks may occur during the operation. Back up your data in advance.

  • During the operation, the system sets the current nodes to the unschedulable state.

  • Only worker nodes are removed. Master nodes are not removed.

  • Even if you choose to release nodes (nodes with release_node set to true), subscription nodes are not released. You must release them in the ECS console after removing the nodes.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cs:RemoveNodePoolNodes

update

*Cluster

acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}

None None

Request syntax

DELETE /clusters/{ClusterId}/nodepools/{NodepoolId}/nodes HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The cluster ID.

c23421cfa74454bc8b37163fd19af****

NodepoolId

string

Yes

The node pool ID.

np97de2cfb1ba042398dd8f5504c94****

Request parameters

Parameter

Type

Required

Description

Example

release_node

boolean

No

Specifies whether automatic release the nodes. Valid values:

  • true: Releases the nodes.

  • false: Does not release the nodes.

Removing nodes does not automatically release subscription nodes. Automatic release subscription nodes, refer to Change the billing method of an instance from subscription to pay-as-you-go to change the billing method of the nodes to pay-as-you-go, and then log on to the ECS console automatic release them.

true

drain_node

boolean

No

Specifies whether to drain the nodes. Valid values:

  • true: Drains the nodes.

  • false: Does not drain the nodes.

true

nodes deprecated

array

No

[Deprecated]

The list of nodes to be removed.

danger This parameter is deprecated. Use instance_ids instead.

string

No

The node name.

cn-hangzhou.172.16.xxx.xxx

instance_ids

array

No

The list of instances to be removed.

string

No

The instance ID to be removed.

i-bp1c70fqbv1nlu9xxxxx

concurrency

boolean

No

Specifies whether to remove nodes concurrently.

  • true: Nodes are removed from the scaling group concurrently.

  • false: Nodes are removed from the scaling group sequentially.

Default value: false.

false

Response elements

Element

Type

Description

Example

object

The response body.

request_id

string

The request ID.

A9891419-D125-4D89-AFCA-68846675****

task_id

string

The task ID.

T-62a944794ee141074400****

Examples

Success response

JSON format

{
  "request_id": "A9891419-D125-4D89-AFCA-68846675****",
  "task_id": "T-62a944794ee141074400****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.