All Products
Search
Document Center

ENS:CreateClusterNodePool

Last Updated:Aug 18, 2026

Creates a node pool for a cluster. A node pool is a logical collection of nodes that share the same attributes, allowing unified management and O&M operations such as node upgrades and elastic scaling. You can further use the automated O&M capabilities of node pools, including automatic OS CVE vulnerability patching, automatic faulty node recovery, and automatic kubelet and containerd version upgrades, to reduce O&M costs.

Operation description

  • Single-user call frequency: 10 calls per second.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ens:CreateClusterNodePool

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The cluster ID.

eck-xxxxxxxx

NodepoolInfo

object

Yes

The node pool configuration.

Name

string

Yes

The name of the node pool.

test1

ScalingGroup

object

Yes

The scaling group configuration.

DesiredSize

integer

No

The desired number of instances.

3

KeyPairName

string

No

The key pair for the instance. This parameter is mutually exclusive with password.

key-pair-name

VswitchIds

array

Yes

The vSwitches used by instances.

string

No

The ID of the vSwitch for cluster nodes. The ENS region of the vswitch_ids must be the same as the value of ens_region_id.

vsw-58eu2p6v64qw8ihhit1wz7wgv

InstanceChargeType

string

No

The billing type of the instance.

Valid values:

  • PostPaid :

    pay-as-you-go.

  • PrePaid :

    subscription.

PostPaid

InstanceTypes

array

Yes

The list of instance types for nodes in the node pool.

string

No

The instance type.

ens.sn1.small

SystemDiskCategory

string

No

The type of the system cloud disk. Valid values: local_ssd, local_hdd, cloud_efficiency, and cloud_ssd.

Valid values:

  • cloud_efficiency :

    ultra cloud disk.

  • cloud_ssd :

    SSD cloud disk.

  • local_hdd :

    local HDD.

  • local_ssd :

    local SSD.

cloud_efficiency

SystemDiskSize

integer

No

The size of the system cloud disk. Unit: GB. Minimum value: 20. The value must be a multiple of 10.

80

ImageId

string

Yes

The image ID of the instance.

m-6734fzvcwcv2o8jj201cpa7ox

DataDisks

array<object>

No

The size of data cloud disks.

object

No

The cloud disk type.

Category

string

No

The cloud disk type.

Valid values:

  • cloud_efficiency :

    ultra cloud disk.

  • cloud_ssd :

    SSD cloud disk.

  • local_hdd :

    local HDD.

  • local_ssd :

    local SSD.

cloud_efficiency

Size

integer

No

The size of the data cloud disk. Unit: GB. Minimum value: 20. The value increments by 10.

80

Password

string

No

The password used when the node pool creates instances. This parameter is mutually exclusive with key pair.

some-test-password

KubernetesConfig

object

No

The cluster-related configuration.

PreUserData

string

No

The script that is executed after the machine is created and before it joins the cluster. The content must be Base64-encoded.

ZWNobyBvawo=

UserData

string

No

The script that is executed after the machine is created and after it joins the cluster. The content must be Base64-encoded.

ZWNobyBvawo=

Response elements

Element

Type

Description

Example

object

Schema of Response

Nodepool

object

The node pool configuration.

ClusterId

string

The instance ID.

eck-d2666c5f

NodepoolInfo

object

The node pool information.

Name

string

The name of the node pool.

test1

EnsRegionId

string

The ID of the ENS region where the cluster is located.

cn-guiyang-14

NodepoolId

string

The ID of the node pool.

np1176939548ac49e59febe82dcbf1ad56

ScalingGroup

object

The ID of the resource group to which the newly created scaling group belongs.

Note

The newly created scaling group is assigned to the specified resource group. If this parameter is not specified, the scaling group is assigned to the default resource group.

VswitchIds

array

The IDs of the VSwitches for the cluster nodes.

string

The ID of the VSwitch.

vsw-58eu2p6v64qw8ihhit1wz7wgv

DataDisks

array<object>

Information about the data disks for the nodes.

object

Information about a data disk.

Category

string

The category of the data disk.

cloud_efficiency

Size

integer

The size of the data disk, in GB.

80

InstanceChargeType

string

The billing method for the instances.

PrePaid

InstanceTypes

array

The instance types for the nodes in the node pool.

string

An instance type.

ens.sn1.small

SystemDiskCategory

string

The category of the system disk.

cloud_efficiency

SystemDiskSize

integer

The size of the system disk, in GB.

80

ImageId

string

The ID of the image used for the nodes.

m-67bdk1kpu1ylmt7k33h5dbiov

KeyPairName

string

The name of the key pair.

key-pair-name

Password

string

The login password for the instances.

**********

KubernetesConfig

object

The Kubernetes-related configuration.

PreUserData

string

A Base64-encoded script that executes on an instance after creation but before the node joins the cluster.

ZWNobyBvawo=

UserData

string

A Base64-encoded script that is executed on an instance after it joins the cluster.

ZWNobyBvawo=

Status

object

The node pool status information.

State

string

The state of the node pool. Valid values:

  • active: The node pool is active.

  • scaling: The node pool is scaling out.

  • removing_nodes: The node pool is scaling in.

active

TotalNodes

integer

The total number of instances in the node pool. This includes instances that are being created, are in service, or are being removed.

10

DesiredNodes

integer

The desired number of instances.

10

ServingNodes

integer

The number of instances that are in service.

10

InitialNodes

integer

The number of instances that are being created.

0

RemovingNodes

integer

The number of instances that are being removed.

0

FailedNodes

integer

The number of failed instances.

0

RequestId

string

The request ID.

C0003E8B-B930-4F59-ADC0-0E209A9012A8

Examples

Success response

JSON format

{
  "Nodepool": {
    "ClusterId": "eck-d2666c5f",
    "NodepoolInfo": {
      "Name": "test1",
      "EnsRegionId": "cn-guiyang-14",
      "NodepoolId": "np1176939548ac49e59febe82dcbf1ad56"
    },
    "ScalingGroup": {
      "VswitchIds": [
        "vsw-58eu2p6v64qw8ihhit1wz7wgv"
      ],
      "DataDisks": [
        {
          "Category": "cloud_efficiency",
          "Size": 80
        }
      ],
      "InstanceChargeType": "PrePaid",
      "InstanceTypes": [
        "ens.sn1.small"
      ],
      "SystemDiskCategory": "cloud_efficiency",
      "SystemDiskSize": 80,
      "ImageId": "m-67bdk1kpu1ylmt7k33h5dbiov",
      "KeyPairName": "key-pair-name",
      "Password": "**********"
    },
    "KubernetesConfig": {
      "PreUserData": "ZWNobyBvawo=",
      "UserData": "ZWNobyBvawo="
    },
    "Status": {
      "State": "active",
      "TotalNodes": 10,
      "DesiredNodes": 10,
      "ServingNodes": 10,
      "InitialNodes": 0,
      "RemovingNodes": 0,
      "FailedNodes": 0
    }
  },
  "RequestId": "C0003E8B-B930-4F59-ADC0-0E209A9012A8"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.