All Products
Search
Document Center

Container Service for Kubernetes:RemoveNodePoolNodes

Last Updated:Feb 29, 2024

Removes nodes from a node pool.

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cs:RemoveNodePoolNodesWrite
  • Cluster
    acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the cluster.

c23421cfa74454bc8b37163fd19af****
NodepoolIdstringYes

The node pool ID.

np97de2cfb1ba042398dd8f5504c94****
release_nodebooleanNo

Specifies whether to release the nodes after they are removed. Valid values:

  • true: release the nodes after they are removed.
  • false: do not release the nodes after they are removed.
true
drain_nodebooleanNo

Specifies whether to drain the nodes that you want to remove. Valid values:

  • true: drain the nodes that you want to remove.
  • false: do not drain the nodes that you want to remove.
true
nodesarrayNo

A list of nodes that you want to remove.

stringNo

The name of the node that you want to remove.

cn-hangzhou.172.16.xxx.xxx
instance_idsarrayNo

A list of instances that you want to remove.

stringNo

The ID of the instance that you want to remove.

i-bp1c70fqbv1nlu9xxxxx

Response parameters

ParameterTypeDescriptionExample
object

The response body.

request_idstring

The request ID.

A9891419-D125-4D89-AFCA-68846675E2F7
task_idstring

The task ID.

T-62a944794ee141074400****

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2024-01-19The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-12-15The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: concurrency
2023-07-21The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2022-09-21Add Operationsee changesets