All Products
Search
Document Center

ENS:CreateClusterNodePool

Last Updated:Mar 31, 2026

A node pool is a logical group of nodes with the same properties, enabling unified management and operations such as node upgrades and autoscaling. A node pool's automated features also reduce operations costs. For example, it can automatically remediate OS CVE vulnerabilities, recover failed nodes, and upgrade the kubelet and containerd. Call CreateClusterNodePool to create a node pool.

Operation description

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

  • Creating a cluster is an asynchronous operation. After the API call returns, cluster initialization takes 10 to 20 minutes. During this process, you can call DescribeClustersV1 to query the cluster creation status. Once the cluster is created, call DescribeClusterUserKubeconfig to retrieve the cluster certificate.

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 in the node pool.

3

KeyPairName

string

No

The name of the key pair for the instances. You must specify either this parameter or Password.

key-pair-name

VswitchIds

array

Yes

The IDs of the vSwitches used by the instances.

string

No

The ID of a vSwitch for the cluster nodes. The vSwitch must be in the ENS region specified by ens_region_id.

vsw-58eu2p6v64qw8ihhit1wz7wgv

InstanceChargeType

string

No

The billing method for the instances.

PostPaid

InstanceTypes

array

Yes

The instance types for the node pool.

string

No

The instance type.

ens.sn1.small

SystemDiskCategory

string

No

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

cloud_efficiency

SystemDiskSize

integer

No

The size of the system disk, in GB. The value must be at least 20 and a multiple of 10.

80

ImageId

string

Yes

The ID of the image for the instances.

m-6734fzvcwcv2o8jj201cpa7ox

DataDisks

array<object>

No

The data disks to attach to the instances.

object

No

The configuration of a data disk.

Category

string

No

The category of the data disk.

cloud_efficiency

Size

integer

No

The size of the data disk, in GB. The value must be at least 20 and a multiple of 10.

80

Password

string

No

The password for the instances in the node pool. You must specify either this parameter or KeyPairName.

some-test-password

KubernetesConfig

object

No

The Kubernetes configuration.

PreUserData

string

No

A Base64-encoded script to run on an instance after it is created but before it joins the cluster.

ZWNobyBvawo=

UserData

string

No

A Base64-encoded script to run on an instance after it joins the cluster.

ZWNobyBvawo=

Response elements

Element

Type

Description

Example

object

The response data.

Nodepool

object

The configuration of the node pool.

ClusterId

string

The cluster ID.

eck-d2666c5f

NodepoolInfo

object

Information about the node pool.

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 configuration of the associated scaling group.

Note

The scaling group is assigned to a specified resource group. If one is not specified during creation, the default resource group is used.

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 status of the node pool.

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.