Call the ModifyClusterNodePool operation to scale a node pool.
Debug
Request syntax
PUT /clusters/ClusterId/nodepools/NodepoolId HTTP/1.1
Content-Type:application/json
{
"scaling_group": {
"desired_size": Long
}
}Request parameters
| Parameter Name | Type | Required | Example | Description |
| ClusterId | String | Yes | c23421cfa74454bc8b37163fd19af**** | The cluster ID. |
| NodepoolId | String | Yes | np31da1b38983f4511b490fc62108a**** | The node pool ID. |
| Parameter | Type | Required | Example | Description |
| desired_size | Long | No | 1 | The expected number of nodes in the node pool. Adjust this parameter to scale the node pool. Due to the quota limit on the number of nodes in a cluster, you can add a maximum of 500 nodes in a single scale-out operation. |
Response body syntax
HTTP/1.1 200
Content-Type:application/json
{
"task_id" : "String"
}Response parameters
| Parameter Name | Type | Example | Description |
| task_id | String | T-5faa48fb31b6b8078d00**** | The task ID. |
Example of scaling out a node pool
Sample request
PUT /clusters/c23421cfa74454bc8b37163fd19af****/nodepools/np31da1b38983f4511b490fc62108a**** HTTP/1.1
Content-Type:application/json
{
"scaling_group":{"desired_size":1}
}Sample response
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<task_id>T-5faa48fb31b6b8078d00****</task_id>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"task_id" : "T-5faa48fb31b6b8078d00****"
}Error codes
For more information, see Error Center.
Developer resources
- SDK
Alibaba Cloud provides SDKs in multiple languages to help you quickly integrate Alibaba Cloud products and services using APIs. You can use an SDK to call an API without the need to manually authenticate the signature.
- OpenAPI Explorer
OpenAPI Explorer lets you quickly retrieve and visually debug APIs. It provides an online command-line tool and dynamically generates executable SDK code examples.
- Cloud Assistant CLI
Cloud Assistant CLI is an Alibaba Cloud tool for asset management and configuration. It lets you use commands to easily and quickly manage multiple Alibaba Cloud products and services.
该文章对您有帮助吗?