Scaling a Node Pool

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

Function

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

NOTE:

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

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

cluster_id

Yes

String

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

nodepool_id

Yes

String

Node pool ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format).

X-Auth-Token

Yes

String

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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

kind

Yes

String

API type. The value is fixed at NodePool.

apiVersion

Yes

String

API version. The value is fixed at v3.

spec

Yes

ScaleNodePoolSpec object

Parameters in the request for scaling a node pool

Table 4 ScaleNodePoolSpec

Parameter

Mandatory

Type

Description

desiredNodeCount

Yes

Integer

Desired number of nodes in a node pool

scaleGroups

Yes

Array of strings

Node pool to be scaled in or out. Only one scaling group can be specified. To scale the default scaling group, set the value to default.

options

No

ScaleNodePoolOptions object

Configurations of node pool scaling options

Table 5 ScaleNodePoolOptions

Parameter

Mandatory

Type

Description

scalableChecking

No

String

Scale-out status check policy. The value can be instant (synchronous checks) or async (asynchronous checks). It defaults to instant.

billingConfigOverride

No

ScaleUpBillingConfigOverride object

Overwrites the default billing mode configuration of a node during node pool scaling.

Table 6 ScaleUpBillingConfigOverride

Parameter

Mandatory

Type

Description

billingMode

Yes

Integer

Billing mode of a node. The value can be 0 (pay-per-use).

Response Parameters

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.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback