You need to enable JavaScript to run this app.
Volcengine Kubernetes Engine

Volcengine Kubernetes Engine

Copy page
Download PDF
Node management
DeleteNodes
Copy page
Download PDF
DeleteNodes
Delete one or more nodes from the cluster.​
Usage instructions​
This is an asynchronous API. When this API returns a success message, the node will be in the {Deleting, [Progressing]} state. However, the return of a success message does not indicate that the node will be deleted ultimately. You need to call the ListNodes API to check whether the node exists. If the node cannot be found, it has been deleted successfully.​
Request description​
VKE has deployed services in multiple regions globally to provide a stable and low-latency access experience. You can refer to the Service addresses topic and select the most suitable access point based on the region where your business is located.​
  • Request method: POST​
  • Request URL: https://vke.cn-beijing.volcengineapi.com?Action=DeleteNodes&Version=2022-05-12​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameter​
The following table describes the API request parameters. You also need to provide public parameters when calling this API. For details about public request parameters, see Public parameters.​
​
Parameter​
Type​
Required​
Sample value​
Description​
Action​
String​
Yes​
DeleteNodes​
The API name. The name of the current API is DeleteNodes.​
Version​
String​
Yes​
May 12, 2022​
The API version. The API version is 2022-05-12.​
ClusterId​
String​
Yes​
cc5sil******​
Cluster ID.​
You can call the ListClusters API to obtain cluster IDs.​
warning​
The cluster must be in one of the following states:​
  • {Running,[*]}​
  • {Updating, [Progressing]}​
  • {Stopped, [Balance]}​
  • You can call the ListClusters API to obtain the current status of the cluster.​
NodePoolId​
String​
No​
pc8oah9********​
The node pool ID.​
You can call the ListNodePools API to obtain the node pool ID.​
warning​
The node pool must be in one of the following states:​
  • {Running,[*]}​
  • {Scaling,[Progressing]}​
  • {Failed, [ClusterNotRunning, ResourceCleanupFailed]}​
  • You can call the ListNodePools API to obtain the current status of the node pool.​
Ids​
Array of String​
Yes​
["nc5t5epm******"]​
A list of node IDs.​
You can call the ListNodes API to obtain the node ID. At most 100 node IDs can be specified per call.​
warning​
  • A node must be in one of the following states:​
  • {Running,[*]}​
  • {Stopped, [*]}​
  • {Failed, [InitilizeFailed, NotReady, ResourceCleanupFailed, Balance, Unknown]}​
  • You can call the ListNodes API to obtain the current status of the node.​
  • When taking Bare Metal nodes offline, ECS will attempt a normal shutdown based on the node status. If a normal shutdown is not possible, a forced shutdown will be performed. For more details, see StopInstance.​
  • If the specified node pool has AffinityGroupConfig (beta) enabled, ensure that the remaining node count after node removal is an integer multiple of the affinity group size. You can also delete all nodes in the node pool.​
CascadingDeleteResources​
Array of String​
No​
["Ecs"]​
warning​
Parameter deprecation notes:​
  • Only existing users can specify this parameter. For the methods of determining existing users, see FAQ.​
  • New users (those who activated VKE after December 18, 2023) should use the RetainResources parameter.​
Synchronously delete the associated resources of the specified nodes. Values:​
  • This parameter is left empty by default, which indicates that associated resources will not be deleted.​
  • Ecs: Delete non-subscription ECS instances.​
  • Subscription ECS instances are only removed from the cluster and will not be deleted. You can query the instances by using the ECS console or ECS API and perform operations on these instances based on your business requirements.​
tip​
During deletion, resources cannot be deleted if deletion protection is enabled for these resources. Otherwise, they will continue to be deleted. We recommend that you adjust the deletion protection settings based on your business requirements before calling the API.​
RetainResources​
Array of String​
No​
["Ecs"]​
warning​
  • Existing users must complete API modification before using this parameter. For the methods of determining existing users, see FAQ.​
  • New users (those who activated VKE after December 18, 2023) can directly use this parameter.​
The resources to be retained after node deletion. Valid values:​
  • An empty value (default) deletes all associated resources.​
  • If the node is a Subscription ECS instance, this API only removes the ECS instance from the cluster and does not delete the instance. You can query the instances by using the ECS console or ECS API and perform operations on these instances based on your business requirements.​
  • ECS: Retain the ECS instance corresponding to the node.​
tip​
During deletion, resources cannot be deleted if deletion protection is enabled for these resources. Otherwise, they will continue to be deleted. We recommend that you adjust the deletion protection settings based on your business requirements before calling the API.​
Drain​
Boolean​
No​
false​
Whether to drain the node before it is deleted. Valid values:​
  • true: Yes.​
  • false: (Default) No.​
​
Sample requests​
​
POST https://vke.cn-beijing.volcengineapi.com?Action=DeleteNodes&Version=2022-05-12​
Content-Type: application/json​
{​
"ClusterId": "cc5sil******",​
"NodePoolId": "pc8oah9********",​
"Ids": [​
"nc5t5epm******"​
],​
"CascadingDeleteResources": [​
"Ecs"​
],​
"RetainResources": [​
"Ecs"​
],​
"Drain": true​
}​
​
Response parameter​
This API has no API-specific response parameters. For details about common response parameters, see Response results.​
Sample responses​
​
{​
"ResponseMetadata": {​
"RequestId": "202306041104********",​
"Action": "DeleteNodes",​
"Version": "2022-05-12",​
"Service": "vke",​
"Region": "cn-beijing"​
}​
}​
​
Error code​
The error codes for this API are listed in the table below. For public error codes, see Public error codes.​
​
HTTP status code​
Error code​
Error message​
Description​
400​
OperationDenied.ClusterStatus​
The action is forbidden due to cluster status {{statusPhase}} and {{statusConditions}}.​
The current status of the specified cluster does not support this operation. Confirm the required cluster status for this API and try again.​
400​
OperationDenied.NodePoolStatus​
The action is forbidden on node pool {{nodePoolId}} due to node pool status {{statusPhase}} and {{statusConditions}}.​
The current status of the specified node pool does not support this operation. Please confirm the required node pool status for this API and try again.​
400​
OperationDenied.NodeStatus​
The action is forbidden on node {{nodeId}} due to node status {{statusPhase}} and {{statusConditions}}.​
The current node status does not support this operation. Please confirm the required node status for this API and try again.​
400​
OperationDenied.NodePoolReplicas​
The operation has been denied due to the node pool min/max replicas limit.​
The maximum node count for this node pool has been reached. Please reduce the number of ECS instance IDs to be added and try again later.​
If autoscaling is enabled for the target node pool, you can update the maximum number of nodes (MaxReplicas) in the target node pool. Then, call this API again to add existing nodes. Call the UpdateNodePoolConfig API to update the node pool.​
400​
AffinityGroupMismatch.InstanceIds​
The specified InstanceIds and AffinityGroup {{AffinityGroupId}} are mismatched.​
The specified ECS instances do not match the affinity group configuration. The number of nodes in the affinity group-based node pool must be an integer multiple of the affinity group size. Check the specified nodes and node pools, confirm the relevant parameters, and try again later.​
​
​
Last updated: 2026.09.15 10:26:27