Updated on 2025-07-07 GMT+08:00

Scaling a Node Pool

Function

This API is used to scale in or out a node pool.

The URL for cluster management is in the format of https://Endpoint/uri, where uri specifies the resource path for API access.

URI

POST /api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/operation/scale

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Details:

Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

Constraints:

None

Options:

Project IDs of the account

Default value:

N/A

cluster_id

Yes

String

Details:

Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

Constraints:

None

Options:

Cluster IDs

Default value:

N/A

nodepool_id

Yes

String

Details:

Node pool ID. For details about how to obtain the ID, see How to Obtain Parameters in the API URI.

Constraints:

None

Options:

Cluster IDs

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Details:

The request body type or format

Constraints:

The GET method is not verified.

Options:

  • application/json

  • application/json;charset=utf-8

  • application/x-pem-file

  • multipart/form-data (used when the FormData parameter is present)

Default value:

N/A

X-Auth-Token

Yes

String

Details:

Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token.

Constraints:

None

Options:

N/A

Default value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

kind

Yes

String

Details:

API type

Constraints:

None

Options:

The value is fixed at NodePool.

Default value:

N/A

apiVersion

Yes

String

Details:

API version

Constraints:

None

Options:

The value is fixed at v3.

Default value:

N/A

spec

Yes

ScaleNodePoolSpec object

Details:

Parameters in the request for scaling a node pool

Constraints:

None

Table 4 ScaleNodePoolSpec

Parameter

Mandatory

Type

Description

desiredNodeCount

Yes

Integer

Details:

Desired number of nodes in a node pool

Constraints:

This parameter is mandatory. If it is omitted, the default value 0 is used. This will result in the deletion of all nodes in the node pool scaling group.

Options:

0 or a positive integer

Default value:

0

scaleGroups

Yes

Array of strings

Details:

Name of the scaling group in a node pool to be scaled

Constraints:

Only one scaling group name can be specified. If the default scaling group is required, set the parameter to default.

Options:

N/A

Default value:

N/A

options

No

ScaleNodePoolOptions object

Details:

Configurations of node pool scaling options

Constraints:

None

Table 5 ScaleNodePoolOptions

Parameter

Mandatory

Type

Description

scalableChecking

No

String

Details:

Policy for checking the scale-out

Constraints:

None

Options:

  • instant: When a scale-out request is delivered, the system synchronously checks whether the underlying resources are sold out.

  • async: When a scale-out request is delivered, the system asynchronously checks whether the underlying resources are sold out.

Default value:

instant

Response Parameters

Status code: 202

The node pool scaling is accepted. Nodes in the node pool will be added or deleted based on the expected number of nodes in the node pool after scaling.

None

Example Requests

  • Scale out nodes in the default scaling group of a node pool (pay-per-use).

    {
      "kind" : "NodePool",
      "apiVersion" : "v3",
      "spec" : {
        "desiredNodeCount" : 1,
        "scaleGroups" : [ "default" ]
      }
    }

Example Responses

None

Status Codes

Status Code

Description

202

The node pool scaling is accepted. Nodes in the node pool will be added or deleted based on the expected number of nodes in the node pool after scaling.

Error Codes

See Error Codes.