CreateClusterNodePool

更新时间:
复制 MD 格式

A node pool is a logical group of nodes that share the same properties. Node pools allow you to manage nodes and perform operations and maintenance (O&M) tasks, such as upgrades and auto scaling, on them as a group. You can use the automated O&M features of a node pool to automatically fix operating system (OS) Common Vulnerabilities and Exposures (CVE) vulnerabilities, recover failed nodes, and upgrade kubelet and containerd versions. This helps reduce your O&M costs. Call the CreateClusterNodePool operation to create a node pool for a cluster.

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

cs:CreateClusterNodePool

create

*Cluster

acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}

None None

Request syntax

POST /clusters/{ClusterId}/nodepools HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The cluster ID.

c61da77e8bfbc4c4c999af2b51b65****

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

nodepool_info

object

No

The node pool configurations.

name

string

Yes

The name of the node pool.

nodepool-test

type

string

No

The type of the node pool. Valid values:

  • ess: a regular node pool. This type of node pool provides managed features and auto scaling.

  • edge: an edge node pool.

  • lingjun: a Lingjun node pool.

  • hybrid: a hybrid cloud node pool.

Valid values:

  • lingjun :

    Lingjun node pool

  • edge :

    edge node pool

  • ess :

    regular node pool

ess

resource_group_id

string

No

The ID of the resource group. Instances that are created in the node pool belong to this resource group.

A resource can belong to only one resource group. You can map resource groups to concepts such as projects, applications, or organizations based on your business scenarios.

rg-acfmyvw3wjmb****

auto_scaling

object

No

The auto scaling configurations.

enable

boolean

No

Specifies whether to enable auto scaling. Valid values:

  • true: Enables auto scaling for the node pool. If the resources planned for the cluster cannot meet the scheduling requirements of pods, Container Service for Kubernetes (ACK) automatically scales out or scales in nodes based on the configured minimum and maximum numbers of instances. For clusters of Kubernetes 1.24 or later, instant scaling is enabled by default. For clusters of a Kubernetes version earlier than 1.24, node autoscaling is enabled by default. For more information, see Node scaling.

  • false: Disables auto scaling. ACK adjusts the number of nodes in the node pool based on the value of `desired_size` to maintain a specific number of nodes.

If you set this parameter to false, other parameters in `auto_scaling` do not take effect.

Default value: false.

false

type

string

No

The type of instances that are automatically scaled. This parameter takes effect only if `enable` is set to `true`. Valid values:

  • cpu: regular instance.

  • gpu: GPU-accelerated instance.

  • gpushare: shared GPU-accelerated instance.

  • spot: spot instance.

Default value: cpu.

Important You cannot change the value of this parameter after the node pool is created.

Valid values:

  • spot :

    spot instance

  • cpu :

    regular instance

  • gpushare :

    shared GPU-accelerated instance

  • gpu :

    GPU-accelerated instance

cpu

max_instances

integer

No

The maximum number of instances that can be created in the node pool. This does not include existing instances. This parameter takes effect only if `enable` is set to `true`.

The value must be in the range of [`min_instances`, 2000]. Default value: 0.

10

min_instances

integer

No

The minimum number of instances that can be created in the node pool. This does not include existing instances. This parameter takes effect only if `enable` is set to `true`.

The value must be in the range of [0, `max_instances`]. Default value: 0.

Note
  • If the minimum number of instances is not 0, the specified number of ECS instances are automatically created after the scaling group is created.

  • We recommend that you set the maximum number of instances to a value that is not smaller than the current number of nodes in the node pool. Otherwise, nodes in the node pool are scaled in after auto scaling is enabled.

1

is_bond_eip deprecated

boolean

No

[This parameter is deprecated] This parameter is deprecated. Use `internet_charge_type` and `internet_max_bandwidth_out` instead.

Specifies whether to associate an EIP with the node. Valid values:

  • true: associates an EIP with the node.

  • false: does not associate an EIP with the node.

Default value: false.

null

eip_internet_charge_type deprecated

string

No

[This parameter is deprecated] Use `internet_charge_type` and `internet_max_bandwidth_out` instead.

The billing method of the EIP. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

Default value: PayByBandwidth.

null

eip_bandwidth deprecated

integer

No

[This parameter is deprecated] Use `internet_charge_type` and `internet_max_bandwidth_out` instead.

The peak bandwidth of the EIP. Unit: Mbps.

null

management

object

No

The configurations of the managed node pool feature.

enable

boolean

No

Specifies whether to enable the managed node pool feature. Valid values:

  • true: Enables the managed node pool feature.

  • false: Disables the managed node pool feature. If you set this parameter to `false`, the other parameters of `management` do not take effect.

Default value: false.

false

auto_repair

boolean

No

Specifies whether to enable auto node repair. This parameter takes effect only if `enable` is set to `true`.

  • true: Enables auto node repair.

  • false: Disables auto node repair.

Default value: true

true

auto_repair_policy

object

No

The auto node repair policy.

restart_node

boolean

No

Specifies whether to allow node restart. This parameter takes effect only if `auto_repair` is set to `true`. Valid values:

  • true: Allows node restart.

  • false: Disallows node restart.

Default value: true

true

approval_required

boolean

No

Specifies whether manual approval is required for node repair.

auto_vul_fix

boolean

No

Specifies whether to automatically fix CVE vulnerabilities. This parameter takes effect only if `enable` is set to `true`.

  • true: Automatically fixes CVE vulnerabilities.

  • false: Does not automatically fix CVE vulnerabilities.

Default value: true.

true

auto_vul_fix_policy

object

No

The policy for automatically fixing CVE vulnerabilities.

restart_node

boolean

No

Specifies whether to allow node restart. This parameter takes effect only if `auto_vul_fix` is set to `true`. Valid values:

  • true: Allows node restart.

  • false: Disallows node restart.

Default value: true

false

vul_level

string

No

The vulnerability levels that are allowed to be automatically fixed. Separate multiple levels with commas. Example: asap,later. Supported vulnerability levels:

  • asap: high

  • later: medium

  • nntf: low

Default value: asap.

asap,nntf

exclude_packages

string

No

The packages that should be excluded from vulnerability fixing.

Default value: kernel.

kernel

auto_upgrade

boolean

No

Specifies whether to enable auto node upgrade. This parameter takes effect only if `enable` is set to `true`.

  • true: Enables auto node upgrade.

  • false: Disables auto node upgrade.

Default value: true.

true

auto_upgrade_policy

object

No

The auto node upgrade policy.

auto_upgrade_kubelet

boolean

No

Specifies whether to allow auto kubelet upgrade. This parameter takes effect only if `auto_upgrade` is set to `true`. Valid values:

  • true: Allows auto kubelet upgrade.

  • false: Disallows auto kubelet upgrade.

Default value: true.

true

auto_upgrade_runtime

boolean

No

Specifies whether to allow auto runtime upgrade. This parameter takes effect only if `auto_upgrade` is set to `true`. Valid values:

  • true: Allows auto runtime upgrade.

  • false: Disallows auto runtime upgrade.

Default value: true.

false

auto_upgrade_os

boolean

No

Specifies whether to allow auto OS upgrade. This parameter takes effect only if `auto_upgrade` is set to `true`. Valid values:

  • true: Allows auto OS upgrade.

  • false: Disallows auto OS upgrade.

Default value: false.

false

upgrade_config deprecated

object

No

[This parameter is deprecated] Use the `auto_upgrade` parameter instead.

The auto upgrade configurations. This parameter takes effect only if `enable` is set to `true`.

auto_upgrade deprecated

boolean

No

[This parameter is deprecated] Use the `auto_upgrade` parameter instead.

Specifies whether to enable auto upgrade. Valid values:

  • true: enables auto upgrade.

  • false: disables auto upgrade.

null

surge

integer

No

The number of extra nodes. You can specify only one of `surge` and `surge_percentage`.

Nodes become unavailable during an upgrade. You can create extra nodes to compensate for the load on the cluster.

Note

We recommend that the number of extra nodes does not exceed the current number of nodes.

0

surge_percentage

integer

No

The percentage of extra nodes. You can specify only one of `surge` and `surge_percentage`.

Number of extra nodes = Percentage of extra nodes × Number of nodes. For example, if you set the percentage of extra nodes to 50% and the number of existing nodes is 6, three extra nodes are created.

0

max_unavailable

integer

No

The maximum number of unavailable nodes. The value must be in the range of [1, 1000].

Default value: 1.

1

auto_fault_diagnosis

boolean

No

scaling_group

object

No

The configurations of the scaling group for the node pool.

vswitch_ids

array

Yes

A list of vSwitch IDs. The number of vSwitch IDs must be in the range of [1, 8].

Note

For high availability, we recommend that you select vSwitches in different zones.

string

No

The vSwitch ID.

vsw-wz9mfnhmssud6eicu****

instance_types

array

Yes

A list of instance types for the nodes in the node pool. When the system creates nodes in the node pool, it selects an instance type from the list that meets the requirements.

The number of instance types must be in the range of [1, 10].

Note

For high availability, we recommend that you select multiple instance types.

string

No

The instance type. For more information, see Instance families.

ecs.d1ne.2xlarge

instance_charge_type

string

Yes

The billing method of the nodes in the node pool. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

Default value: PostPaid.

Valid values:

  • PostPaid :

    pay-as-you-go

  • PrePaid :

    subscription

PostPaid

period

integer

No

The subscription duration of the nodes in the node pool. This parameter is required and takes effect only if `instance_charge_type` is set to `PrePaid`.

  • If `period_unit` is set to `Week`, the valid values of `period` are 1, 2, 3, and 4.

  • If `period_unit` is set to `Month`, the valid values of `period` are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

1

period_unit

string

No

The billing cycle of the nodes in the node pool. This parameter is required and takes effect only if `instance_charge_type` is set to `PrePaid`.

  • Month: The billing cycle is measured in months.

  • Week: The billing cycle is measured in weeks.

Default value: Month.

Month

auto_renew

boolean

No

Specifies whether to enable auto-renewal for the nodes in the node pool. This parameter takes effect only if `instance_charge_type` is set to `PrePaid`. Valid values:

  • true: enables auto-renewal.

  • false: disables auto-renewal.

Default value: false.

true

auto_renew_period

integer

No

The auto-renewal period. Valid values:

  • If `PeriodUnit` is set to `Week`: 1, 2, and 3.

  • If `PeriodUnit` is set to `Month`: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.

1

spot_strategy

string

No

The bidding policy for the spot instances. Valid values:

  • NoSpot: The instance is not a spot instance.

  • SpotWithPriceLimit: Sets the maximum bid price for the spot instance.

  • SpotAsPriceGo: The system automatically bids based on the current market price.

For more information, see Spot instances.

NoSpot

spot_price_limit

array<object>

No

The configurations of the price range for a single spot instance.

object

No

The configurations of the price range for a spot instance. You can set different price ranges for different instance types.

instance_type

string

No

The instance type of the spot instance.

ecs.c6.large

price_limit

string

No

The maximum bid price for a single instance.

0.39

image_type

string

No

The OS image type. Valid values:

  • AliyunLinux: Alinux2 image.

  • AliyunLinuxSecurity: Alinux2 UEFI image.

  • AliyunLinux3: Alinux3 image.

  • AliyunLinux3Arm64: Alinux3 ARM image.

  • AliyunLinux3Security: Alinux3 UEFI image.

  • CentOS: CentOS image.

  • Windows: Windows image.

  • WindowsCore: WindowsCore image.

  • ContainerOS: Container-Optimized OS.

  • AliyunLinux3ContainerOptimized: Alinux3 Container-Optimized OS.

AliyunLinux3

image_id

string

No

The ID of the custom image. By default, the system-provided image is used.

aliyun_2_1903_x64_20G_alibase_20200529.vhd

system_disk_category

string

No

The type of the system disk of the node. Valid values:

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • cloud_auto: ESSD AutoPL disk.

  • cloud_essd_entry: ESSD Entry disk.

Default value: cloud_efficiency.

cloud_efficiency

system_disk_categories

array

No

The types of system disks. If a disk of a high-priority type is unavailable, the system automatically uses a disk of the next priority type to create the system disk.

string

No

The types of system disks for the node.

Valid values:

  • cloud: basic disk.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • cloud_auto: ESSD AutoPL disk.

  • cloud_essd_entry: ESSD Entry disk.

cloud_essd

system_disk_size

integer

No

The size of the system disk of the node. Unit: GiB.

The value must be in the range of [20, 2048].

120

system_disk_performance_level

string

No

The performance level of the system disk for each node. This parameter applies only to Enhanced SSD (ESSD) disks. The performance level of an ESSD is determined by its size. For more information, see ESSD cloud disks.

  • PL0: A moderate maximum concurrent I/O performance and a relatively stable read/write latency.

  • PL1: A moderate maximum concurrent I/O performance and a relatively stable read/write latency.

  • PL2: A high maximum concurrent I/O performance and a stable read/write latency.

  • PL3: A very high maximum concurrent I/O performance and a very stable read/write latency.

PL1

system_disk_encrypted

boolean

No

Specifies whether to encrypt the system disk. Valid values:

  • true: encrypts the system disk.

  • false: does not encrypt the system disk.

false

system_disk_kms_key_id

string

No

The ID of the KMS key that is used to encrypt the system disk.

0e478b7a-4262-4802-b8cb-00d3fb40****

system_disk_encrypt_algorithm

string

No

The encryption algorithm that is used to encrypt the system disk. Valid value: aes-256.

aes-256

system_disk_bursting_enabled

boolean

No

Specifies whether to enable the performance burst feature for the system disk of the node. Valid values:

  • true: Yes.

  • false: No.

This parameter can be set only when `system_disk_category` is set to `cloud_auto`. For more information, see ESSD AutoPL disks.

true

system_disk_provisioned_iops

integer

No

The provisioned read/write IOPS of the system disk of the node.

Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}.

This parameter can be set only when `system_disk_category` is set to `cloud_auto`. For more information, see ESSD AutoPL disks.

1000

data_disks

array

No

The data disk configurations of the nodes in the node pool.

data_disk

No

The data disk configurations.

disk_init

array

No

The block device initialization configurations.

DiskInit

No

The DiskInit configurations.

security_group_ids

array

No

A list of security group IDs. You must specify one of `security_group_ids` and `security_group_id`. We recommend that you specify `security_group_ids`. If you specify both `security_group_id` and `security_group_ids`, `security_group_ids` takes precedence.

string

No

A list of security group IDs. You must specify one of `security_group_ids` and `security_group_id`. We recommend that you specify `security_group_ids`. If you specify both `security_group_id` and `security_group_ids`, `security_group_ids` takes precedence.

sg-wz9a8g2mt6x5ll******

key_pair

string

No

The name of the key pair that is used for passwordless logon. You must specify one of `key_pair` and `login_password`.

Note

If you select Container-Optimized OS for the node pool, you can use only `key_pair`.

np-key-name

login_password

string

No

The SSH logon password. You must specify one of `key_pair` and `login_password`. The password must be 8 to 30 characters in length, and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

****

login_as_non_root

boolean

No

Specifies whether to log on to the created ECS instances as a non-root user.

  • true: Logs on as the ecs-user.

  • false: Logs on as the root user.

true

cis_enabled deprecated

boolean

No

[Deprecated] Use the `security_hardening_os` parameter instead.

null

soc_enabled

boolean

No

Specifies whether to enable MLPS 2.0 security hardening. You can enable MLPS 2.0 security hardening for nodes only when you select Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 for the OS image. Alibaba Cloud provides baseline check standards and scanning programs for Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 Level 3 of MLPS 2.0 to ensure classified protection compliance.

false

security_hardening_os

boolean

No

Alibaba Cloud OS security hardening. Valid values:

  • true: Enables Alibaba Cloud OS security hardening.

  • false: Disables Alibaba Cloud OS security hardening.

Default value: false.

false

internet_charge_type

string

No

The billing method of the public IP address. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

PayByTraffic

internet_max_bandwidth_out

integer

No

The maximum outbound public bandwidth of the node. Unit: Mbit/s. The value must be in the range of [1, 100].

5

tags

array<object>

No

The tags that you want to add only to ECS instances.

A tag key cannot be repeated. The tag key can be up to 128 characters in length. The tag key and the tag value cannot start with “aliyun” or “acs:”, and cannot contain “https://” or “http://”.

object

No

The node tag.

key

string

No

The name of the tag.

node-k-1

value

string

No

The tag value.

node-v-1

desired_size

integer

No

The expected number of nodes in the node pool.

The total number of nodes that the node pool should maintain. We recommend that you configure at least two nodes to ensure that cluster components run as expected. You can adjust the expected number of nodes to scale out or scale in the node pool.

If you do not need to create nodes, set this parameter to 0. You can manually adjust the number of nodes later.

0

multi_az_policy

string

No

The scaling policy for the ECS instances in the multi-zone scaling group. Valid values:

  • PRIORITY: Scales instances based on the vSwitch priority. The system scales instances based on the order of vSwitches that you specify in `VSwitchIds.N`. If the system fails to create an ECS instance in the zone where the vSwitch with the highest priority resides, it automatically uses the vSwitch with the next highest priority to create the instance.

  • COST_OPTIMIZED: Creates instances based on the vCPU unit price in ascending order. When multiple instance types are specified and the preemptible instance policy is configured, the system gives priority to creating the lowest-cost instance type. You can also use the `CompensateWithOnDemand` parameter to specify whether to automatically create pay-as-you-go instances when preemptible instances cannot be created due to insufficient inventory.

    Note

    COST_OPTIMIZED takes effect only when multiple instance types are specified or the preemptible instance policy is configured.

  • BALANCE: Evenly distributes ECS instances across the specified zones. If the distribution of ECS instances becomes unbalanced due to insufficient inventory, you can call the API RebalanceInstances operation to balance the resource distribution.

Default value: PRIORITY.

COST_OPTIMIZED

scaling_policy

string

No

The scaling mode of the scaling group. Valid values:

  • release: standard mode. The system creates and releases ECS instances to scale the group.

  • recycle: accelerated mode. The system creates, stops, and starts ECS instances to scale the group. This improves the scaling speed. When an instance is stopped, its computing resources are not billed, but its storage resources are. This does not apply to instances with local disks.

Default value: release.

release

on_demand_base_capacity

integer

No

The minimum number of pay-as-you-go instances that must be included in the scaling group. The value must be in the range of [0, 1000]. If the number of pay-as-you-go instances is less than this value, the system gives priority to creating pay-as-you-go instances.

0

on_demand_percentage_above_base_capacity

integer

No

The percentage of pay-as-you-go instances among the extra instances that are created after the minimum number of pay-as-you-go instances (`on_demand_base_capacity`) is met. The value must be in the range of [0, 100].

20

spot_instance_pools

integer

No

The number of instance types that you can specify. The scaling group creates preemptible instances of multiple instance types that are available at the lowest cost. The value must be in the range of [1, 10].

5

spot_instance_remedy

boolean

No

Specifies whether to enable the instance reclaim mode. After this mode is enabled, when the system receives a message that a spot instance is about to be reclaimed, the scaling group attempts to create a new instance to replace the instance that is about to be reclaimed. Valid values:

  • true: Enables the instance reclaim mode.

  • false: Disables the instance reclaim mode.

false

compensate_with_on_demand

boolean

No

Specifies whether to automatically create pay-as-you-go instances to meet the instance quantity requirement when `multi_az_policy` is set to `COST_OPTIMIZED` and spot instances cannot be created due to issues such as price or insufficient inventory. Valid values:

  • true: Allows the system to automatically create pay-as-you-go instances to meet the required number of ECS instances.

  • false: Does not allow the system to automatically create pay-as-you-go instances to meet the required number of ECS instances.

true

deploymentset_id

string

No

The ID of the deployment set. You can use a deployment set to distribute the ECS instances created in the node pool across different physical servers to ensure high availability and underlying disaster recovery. When you create ECS instances in a deployment set, the instances are launched in the specified region based on the deployment strategy that you set.

Important After you select a deployment set, the maximum number of nodes in the node pool is limited. By default, a deployment set supports a maximum of 20 × Number of zones (the number of zones is determined by the vSwitches) nodes. Select a deployment set with sufficient quota to prevent node creation failures.

ds-bp1d19mmbsv3jf6xxxxx

rds_instances

array

No

A list of RDS instances.

string

No

The ID of the RDS instance.

rds-****

private_pool_options

object

No

The private pool configurations.

id

string

No

The ID of the private pool. You must specify the private pool ID when `match_criteria` is set to `Target`.

eap-bp67acfmxazb4****

match_criteria

string

No

The type of the private pool. This parameter specifies the capacity of the private pool that you want to use to launch instances. An elastic assurance service or a capacity reservation service takes effect after it is generated. You can select a capacity type when you launch an instance. Valid values:

  • Open: Open mode. The system automatically matches the capacity of open private pools. If no matching private pool is found, the instance is launched using public pool resources.

  • Target: Target mode. The instance is launched using the capacity of the specified private pool. If the capacity of the private pool is unavailable, the instance fails to be launched.

  • None: The instance is launched without using the capacity of a private pool.

Target

security_group_id deprecated

string

No

The ID of the security group for the node pool. You must specify one of `security_group_ids` and `security_group_id`. We recommend that you specify `security_group_ids`.

sg-wz9a8g2mt6x5llu0****

platform deprecated

string

No

[This parameter is deprecated] Use the `image_type` parameter instead.

The OS distribution. Valid values:

  • CentOS

  • AliyunLinux

  • Windows

  • WindowsCore

Default value: AliyunLinux.

null

instance_patterns

array

No

The instance property configurations.

instance_patterns

No

The instance properties.

ram_role_name

string

No

The name of the worker RAM role.

  • If this parameter is left empty, the default worker RAM role of the cluster is used.

  • If this parameter is not empty, the specified RAM role must be a service role, and its trusted service must be Elastic Compute Service. For more information, see Create a service role. If the specified RAM role is not the default worker RAM role of the cluster, the name of the role cannot start with `KubernetesMasterRole-` or `KubernetesWorkerRole-`.

Important This parameter is supported only by ACK managed clusters of Kubernetes 1.22 or later.

example-role

instance_metadata_options InstanceMetadataOptions

No

The ECS instance metadata access configurations.

resource_pool_options

object

No

The resource pool and policy used to create instances. Note: This parameter takes effect only when you create pay-as-you-go instances. This parameter cannot be set at the same time as `private_pool_options.match_criteria` and `private_pool_options.id`.

strategy

string

No

The resource pool policy for instance creation. Resource pools include private pools (generated by elastic assurance or capacity reservation services) and public pools. Valid values: PrivatePoolFirst: Prioritizes private pools. If you specify `resouce_pool_options.private_pool_ids`, the specified private pools are used first. If no private pool is specified or the specified pools have insufficient capacity, the system automatically tries to use open private pools. If no suitable private pool is found, the public pool is used. PrivatePoolOnly: Uses only private pools. You must specify `resouce_pool_options.private_pool_ids`. If the specified private pools have insufficient capacity, the instance fails to launch. None: No resource pool policy is used. Default value: None.

PrivatePoolFirst

private_pool_ids

array

No

A list of private pool IDs. These are the IDs of elastic assurance services or capacity reservation services. You can only specify the IDs of private pools in Target mode. The number of IDs must be in the range of 1 to 20.

string

No

The private pool ID. This is the ID of an elastic assurance service or a capacity reservation service. You can only specify the ID of a private pool in Target mode.

eap-bp67acfmxazb4****

system_disk_snapshot_policy_id

string

No

The snapshot policy for the system disk.

sp-0jl6xnmme8v7o935****

node_config

object

No

The node configurations.

kubelet_configuration kubelet_config

No

The Kubelet parameter settings.

kubernetes_config

object

No

The cluster-related configurations.

labels

array

No

The labels that you want to add to the nodes in the Kubernetes cluster.

tag

No

The tag configurations.

taints

array

No

The taint configurations.

taint

No

A collection of taint configurations.

runtime

string

No

The name of the container runtime. ACK supports the following three container runtimes.

  • containerd: We recommend that you use this runtime. It is supported by all cluster versions.

  • Sandboxed-Container.runv: a sandboxed container that provides higher isolation. It is supported by clusters of Kubernetes 1.31 or earlier.

  • docker: no longer maintained. It is supported by clusters of Kubernetes 1.22 or earlier.

Default value: containerd.

containerd

runtime_version

string

No

The version of the container runtime.

1.6.38

cpu_policy

string

No

The CPU management policy of the node. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

  • static: Allows pods with specific resource characteristics on the node to be granted enhanced CPU affinity and exclusivity.

  • none: Enables the default CPU affinity scheme.

Default value: none.

none

user_data

string

No

The instance user data. After the node joins the cluster, the specified user data script is run. For more information, see User-Data scripts.

dGhpcyBpcyBhIGV4YW1wbGU=

unschedulable

boolean

No

Specifies whether the scaled-out nodes are unschedulable.

  • true: The nodes are unschedulable.

  • false: The nodes are schedulable.

true

cms_enabled

boolean

No

Specifies whether to install Cloud Monitor on the ECS nodes. After Cloud Monitor is installed, you can view the monitoring information of the created ECS instances in the Cloud Monitor console. We recommend that you enable this feature. Valid values:

  • true: Installs Cloud Monitor on the ECS nodes.

  • false: Does not install Cloud Monitor on the ECS nodes.

Default value: false.

false

node_name_mode

string

No

The custom node name. If you customize the node name, the node name, ECS instance name, and ECS instance hostname are changed.

Note

For Windows instances for which custom node names are enabled, the hostname is fixed as the IP address. Hyphens (-) are used to replace periods (.) in the IP address. The hostname does not contain a prefix or a suffix.

A node name consists of a prefix, the node IP address, and a suffix.

  • The total length must be 2 to 64 characters. The node name must start and end with a lowercase letter or a digit.

  • The prefix and suffix can contain uppercase letters, lowercase letters, digits, hyphens (-), and periods (.). They must start with an uppercase or lowercase letter. They cannot start or end with a hyphen (-) or a period (.). You cannot use consecutive hyphens (-)or periods (.). You cannot use consecutive hyphens (-) or periods (.).

  • The prefix is required (due to an ECS limit). The suffix is optional.

  • The node IP address is the complete private IP address of the node.

For example, if the node IP address is 192.XX.YY.55, the prefix is aliyun.com, and the suffix is test.

  • If the node is a Linux node, the node name, ECS instance name, and ECS instance hostname are all aliyun.com192.XX.YY.55test.

  • If the node is a Windows node, the ECS instance hostname is 192-XX-YY-55, and the node name and ECS instance name are both aliyun.com192.XX.YY.55test.

aliyun.com192.XX.YY.55test

pre_user_data

string

No

The pre-join instance user data. The specified user data script is run before the node joins the cluster. For more information, see User-Data scripts.

dGhpcyBpcyBhIGV4YW1wbGU

tee_config

object

No

The configurations of the confidential computing cluster.

tee_enable

boolean

No

Specifies whether to enable the confidential computing cluster.

  • true: Enables confidential computing.

  • false: Disables confidential computing.

true

interconnect_config deprecated

object

No

[This parameter is deprecated]

The configurations of the edge node pool.

cen_id

string

No

[This parameter is deprecated]

The ID of the CEN instance that is associated with the enhanced edge node pool.

null

ccn_id

string

No

[This parameter is deprecated]

The ID of the CCN instance that is associated with the enhanced edge node pool.

null

ccn_region_id

string

No

[This parameter is deprecated]

The region of the CCN instance that is associated with the enhanced edge node pool.

null

bandwidth

integer

No

[This parameter is deprecated]

The network bandwidth of the enhanced edge node pool. Unit: Mbps.

null

improved_period

string

No

[This parameter is deprecated]

The subscription duration of the enhanced edge node pool. Unit: months.

null

count deprecated

integer

No

[This parameter is deprecated] Use desired_size instead.

The number of nodes in the node pool.

null

max_nodes deprecated

integer

No

[This parameter is deprecated]

The maximum number of nodes that the edge node pool can contain.

null

interconnect_mode

string

No

The network type of the edge node pool. This parameter takes effect only for node pools of the `edge` type. Valid values:

  • basic: public network. Nodes in the node pool interact with cloud nodes over the Internet. Applications in the node pool cannot directly access the VPC in the cloud.

  • private: private network. Nodes in the node pool connect to the cloud over a leased line, VPN, or CEN to achieve higher communication quality and better security.

basic

host_network

boolean

No

Specifies whether to use the host network for the pod network.

  • true: host network. Pods directly use the network stack of the host and share the IP address and ports with the host.

  • false: container network. Pods have an independent network stack and do not occupy host network ports.

true

intranet

boolean

No

Specifies whether nodes in the edge node pool can communicate with each other at Layer 3.

  • true: All nodes in the node pool can communicate with each other at Layer 3.

  • false: All hosts in the node pool cannot communicate with each other at Layer 3.

true

eflo_node_group

object

No

The Lingjun node pool configurations.

cluster_id

string

No

The ID of the Lingjun cluster that you want to associate with the Lingjun node pool when you create the node pool.

i1169130516633730****

group_id

string

No

The ID of the Lingjun group in the Lingjun cluster that you want to associate with the Lingjun node pool when you create the node pool.

ng-ec3c96ff0aa****

auto_mode

object

No

The intelligent managed node pool configurations.

enable

boolean

No

Specifies whether to enable the intelligent managed mode. Valid values:

  • true: Enables the intelligent managed mode. You can enable this mode only when the intelligent managed mode is enabled for the cluster.

  • false: Disables the intelligent managed mode.

true

node_components

array<object>

No

A list of node components.

array<object>

No

The node component.

name

string

No

The name of the node component.

kubelet

version

string

No

The version of the node component.

1.33.3-aliyun.1

config

object

No

The configurations of the node component.

custom_config

object

No

The custom configurations of the node component.

string

No

The custom configuration string of the node component.

cpuManagerPolicy

Response elements

Element

Type

Description

Example

object

The node pool configurations.

nodepool_id

string

The node pool ID.

np31da1b38983f4511b490fc62108a****

task_id

string

The task ID.

T-613b19bbd160ad492800****

request_id

string

The request ID.

0527ac9a-c899-4341-a21a-****

Examples

Success response

JSON format

{
  "nodepool_id": "np31da1b38983f4511b490fc62108a****",
  "task_id": "T-613b19bbd160ad492800****",
  "request_id": "0527ac9a-c899-4341-a21a-****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.