All Products
Search
Document Center

Container Service for Kubernetes:nodepool

更新時間:Nov 12, 2024
ParameterTypeDescriptionExample
object

The node pool.

auto_scalingobject

The auto scaling configurations of the node pool.

enableboolean

Specifies whether to enable auto scaling for the node pool. Valid values:

  • true: enables auto scaling for the node pool.
  • false: disables auto scaling for the node pool. If you set this parameter to false, other parameters in the auto_scaling section do not take effect.

Default value: false.

true
max_instanceslong

The maximum number of instances that can be created in a scaling group.

10
min_instanceslong

The minimum number of instances that must be kept in a scaling group.

0
typestring

The instance types that can be used for the auto scaling of the node pool. Valid values:

  • cpu: regular instance.
  • gpu: GPU-accelerated instance.
  • gpushare: shared GPU-accelerated instance.
  • spot: preemptible instance.

Default value: cpu.

cpu
is_bond_eipdeprecatedboolean

This parameter is deprecated.

Specifies whether to associate an elastic IP Address (EIP) with the node pool. Valid values:

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

Default value: false.

true
eip_internet_charge_typedeprecatedstring

This parameter is deprecated.

The metering method of the EIP. Valid values:

  • PayByBandwidth: pay-by-bandwidth.
  • PayByTraffic: pay-by-data-transfer.

Default value: PayByBandwidth.

PayByBandwidth
eip_bandwidthdeprecatedlong

This parameter is deprecated.

The maximum bandwidth of the EIP. Unit: Mbit/s.

5
kubernetes_configobject

The configurations of the cluster.

cms_enabledboolean

Specifies whether to install the CloudMonitor agent on Elastic Compute Service (ECS) nodes. After the CloudMonitor agent is installed on ECS nodes, you can view the monitoring information about the instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent. Valid values:

  • true: installs the CloudMonitor agent on ECS nodes.
  • false: does not install the CloudMonitor agent on ECS nodes.

Default value: false.

true
cpu_policystring

The CPU management policy of nodes in the node pool. 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 with enhanced CPU affinity and exclusivity.
  • none: specifies that the default CPU affinity is used.

Default value: none.

none
labelsarray

The labels of the nodes in the node pool. You can add labels to the nodes in a Kubernetes cluster.

tag

The node label.

runtimestring

The container runtime. Valid values:

  • containerd: supports all Kubernetes versions. We recommend that you set the parameter to this value.
  • Sandboxed-Container.runv: Sandboxed container provides higher isolation and supports Kubernetes 1.24 and earlier.
  • docker: supports Kubernetes 1.22 and earlier.

Default value: containerd.

containerd
runtime_versionstring

The version of the container runtime.

1.6.20
taintsarray

The configurations of the taints.

taint

The configurations of the taints.

user_datastring

The user data on the node.

MXM=
node_name_modestring

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

  • The prefix and the suffix can contain multiple parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). A custom node name must start and end with a digit or lowercase letter.
  • The node IP address is the complete private IP address of the node.

Set the parameter to a value that is in the customized,aliyun,ip,com format. The value consists of four parts that are separated by commas (,). customized and ip are fixed content. aliyun is the prefix and com is the suffix. Example: aliyun.192.168.xxx.xxx.com.

customized,aliyun,ip,com
nodepool_infoobject

The configuration of a node pool.

namestring

The name of the node pool.

np-test
resource_group_idstring

The ID of the resource group to which the node pool belongs.

rg-acfmyvw3wjm****
typestring

The type of node pool. Valid values:

  • ess: node pool.
  • edge: edge node pool.
ess
scaling_groupobject

The configurations of the scaling group that is used by the node pool.

auto_renewboolean

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

  • true: enables auto-renewal.
  • false: disables auto-renewal.

Default value: true

false
auto_renew_periodlong

The auto-renewal duration of the nodes in the node pool. This parameter is available and required only if you set instance_charge_type to PrePaid.

If you set period_unit to Month, the valid values of auto_renew_period are 1, 2, 3, 6, and 12.

Default value: 1.

0
data_disksarray

The configurations of the data disks that you want to attach to the nodes in the node pool.

data_disk

The configurations of the data disks that you want to attach to the nodes in the node pool.

image_idstring

The custom image ID. By default, the image provided by ACK is used.

aliyun_2_1903_x64_20G_alibase_20200904.vhd
instance_charge_typestring

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

  • PrePaid: subscription.
  • PostPaid: pay-as-you-go.

Default value: PostPaid.

PostPaid
instance_typesarray

The instance type.

string

The instance type.

ecs.n1.medium
key_pairstring

The name of the key pair. You must specify this parameter or the login_password parameter.

Note If you want to create a managed node pool, you must specify key_pair.
np-key
login_passwordstring

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

Hello1234
login_as_non_rootboolean

Specifies whether to allow a non-root user to log on to an ECS instance that is added to the node pool.

periodlong

The subscription duration of the nodes in the node pool. This parameter takes effect and is required only if you set instance_charge_type to PrePaid. If you set period_unit to Month, the valid values of period are 1, 2, 3, 6, and 12.

Default value: 1.

0
period_unitstring

The billing cycle of the nodes in the node pool. This parameter is required if you set instance_charge_type to PrePaid.

Valid value: Month.

Month
platformdeprecatedstring

The distribution of the operating system. Valid values:

  • CentOS
  • AliyunLinux
  • Windows
  • WindowsCore

Default value: AliyunLinux.

AliyunLinux
rds_instancesarray

A list of ApsaraDB RDS instances.

string

The ID of the ApsaraDB RDS instance.

rm-2zey3t89t6280****
spot_strategystring

The type of preemptible instance. Valid values:

  • NoSpot: non-preemptible.
  • SpotWithPriceLimit: a preemptible instance that is configured with the highest bid price.
  • SpotAsPriceGo: bids based on the up-to-date market price are submitted.

For more information, see Preemptible Instance.

NoSpot
spot_price_limitarray<object>

The instance type of preemptible instances and the price cap for the instance type.

object
instance_typestring

The instance type of preemptible instances.

ecs.c6.large
price_limitstring

The price cap of a preemptible instance.

0.39
scaling_policystring

The scaling mode of the scaling group. Valid values:

  • release: the standard mode. ECS instances are created and released based on resource usage.
  • recycle: the swift mode. ECS instances are created, stopped, or started during scaling events. This reduces the time required for the next scale-out event. When the instance is stopped, you are charged only for the storage service. This does not apply to ECS instances that are attached with local disks.

Default value: release.

release
security_group_idstring

The ID of the security group to which you want to add the node pool. You must specify this parameter or the security_group_ids parameter. We recommend that you specify security_group_ids.

sg-2zeihch86ooz9io4****
security_group_idsarray

The IDs of security groups. You must specify this parameter or 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 is used.

string

The ID of the security group.

sg-2zeihch86ooz9io4****
system_disk_categorystring

The type of the system disk. Valid values:

  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD
  • cloud_essd: Enterprise SSD (ESSD).
  • cloud_auto: ESSD AutoPL disk.
  • cloud_essd_entry: ESSD Entry disk.

Default value: cloud_efficiency.

cloud_efficiency
system_disk_categoriesarray

The system disk types. The system creates system disks of a disk type with a lower priority if the disk type with a higher priority is unavailable. Valid values: cloud (basic disk), cloud_efficiency (ultra disk), cloud_ssd (standard SSD), and cloud_essd: (ESSD).

string

The system disk type.

system_disk_sizelong

The size of the system disk. Unit: GiB.

Valid values: 40 to 500.

120
system_disk_performance_levelstring

The performance level (PL) of the system disk. This parameter takes effect only for an ESSD. Valid values:

  • PL0: moderate maximum concurrent I/O performance and low I/O latency.
  • PL1: moderate maximum concurrent I/O performance and low I/O latency.
  • PL2: high maximum concurrent I/O performance and low I/O latency.
  • PL3: ultra-high maximum concurrent I/O performance and ultra-low I/O latency.
PL1
system_disk_encryptedboolean

Specifies whether to encrypt the system disk. Valid values: true: encrypts the system disk. false: does not encrypt the system disk.

system_disk_kms_key_idstring

The ID of the Key Management Service (KMS) key that is used to encrypt the system disk.

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

The algorithm that you want to use to encrypt the system disk. Set the value to aes-256.

aes-256
system_disk_provisioned_iopslong

The preset read/write IOPS of the system disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS} Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}.

This parameter is available only if SystemDiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disks.

1000
system_disk_bursting_enabledboolean

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

  • true: enables the burst feature.
  • false: disables the burst feature.

This parameter is available only if SystemDiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disks.

true
tagsarray<object>

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

The tag key must be unique and can be up to 128 characters in length. The tag key and value must not start with aliyun or acs: or contain https:// or http://.

object
keystring

The key of the label.

key
valuestring

The value of the label.

value
vswitch_idsarray

The IDs of vSwitches.

string

The IDs of vSwitches.

vsw-2ze0fmpbwo140ahni****
multi_az_policystring

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

  • PRIORITY: ECS instances are scaled based on the VSwitchIds.N parameter. If an ECS instance cannot be created in the zone in which the vSwitch that has the highest priority resides, Auto Scaling creates the ECS instance in the zone in which the vSwitch that has the next highest priority resides.

  • COST_OPTIMIZED: ECS instances are created based on the vCPU unit price in ascending order. Preemptible instances are preferably created if preemptible instance types are specified in the scaling configurations. You can set CompensateWithOnDemand to specify whether to automatically create pay-as-you-go instances when preemptible instances cannot be created due to insufficient inventory.

    **

    Note COST_OPTIMIZED is valid only when multiple instance types are specified or at least one preemptible instance type is specified.

  • BALANCE: ECS instances are evenly distributed across multiple zones specified by the scaling group. If the distribution of ECS instances across zones is not balanced due to reasons such as insufficient inventory, you can call the RebalanceInstances operation to evenly distribute the ECS instances across zones. For more information, see RebalanceInstances

Default value: PRIORITY.

COST_OPTIMIZED
on_demand_base_capacitylong

The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is smaller than the value of this parameter, Auto Scaling preferably creates pay-as-you-go instances.

0
on_demand_percentage_above_base_capacitylong

The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by on_demand_base_capacity. Valid values: 0 to 100.

20
spot_instance_poolslong

The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10.

5
spot_instance_remedyboolean

Indicates whether preemptible instances can be supplemented. If you set this parameter to true, when the scaling group receives a system message indicating that a preemptible instance is to be reclaimed, the scaling group creates a new instance to replace this instance. Valid values:

  • true: supplements preemptible instances.
  • false: does not supplement preemptible instances.
false
compensate_with_on_demandboolean

Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created due to reasons such as cost or insufficient inventory. This parameter takes effect if you set multi_az_policy to COST_OPTIMIZED. Valid values:

  • true: automatically creates pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created
  • false: does not create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created.
true
internet_charge_typestring

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

  • PayByBandwidth: pay-by-bandwidth.
  • PayByTraffic: pay-by-data-transfer
PayByBandwidth
internet_max_bandwidth_outlong

The maximum outbound bandwidth of the public IP address. Unit: Mbit/s. Valid values: 1 to 100.

10
image_typestring

The type of the operating system image. You must specify this parameter or the platform parameter. Valid values:

  • AliyunLinux: Alibaba Cloud Linux 2.
  • AliyunLinux3: Alibaba Cloud Linux 3
  • AliyunLinux3Arm64: Alibaba Cloud Linux 3 (ARM).
  • AliyunLinuxUEFI: Alibaba Cloud Linux UEFI 2.
  • CentOS: CentOS.
  • Windows: Windows.
  • WindowsCore: Windows Core.
  • ContainerOS: ContainerOS.
AliyunLinux
deploymentset_idstring

The ID of the deployment set.

ds-bp1d19mmbsv3jf6xxxxx
desired_sizelong

The expected number of nodes in the node pool.

2
private_pool_optionsobject

The configurations of the private node pool.

idstring

The ID of the private node pool.

eap-bp67acfmxazb4****
match_criteriastring

The type of the private node pool. This parameter specifies the type of the private node pool that you want to use to create instances. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. The system selects a private pool to start instances. Valid values:

  • Open: specifies an open private node pool. The system selects an open private pool to start instances. If no matching open private pools are available, the resources in the public pool are used.
  • Target: specifies a private node pool. The system uses the resources of the specified private pool to start instances. If the specified private pool is unavailable, instances cannot be started.
  • None: does not use private pools. The resources of private node pools are not used to launch instances.
Open
ram_role_namestring

The name of the worker Resource Access Management (RAM) role. This parameter is available only to users in the whitelist. To use this parameter, submit a ticket.

Note You can configure this parameter when you create a node pool only for an ACK managed cluster that runs Kubernetes 1.22 or later.
example-role
tee_configobject

The configurations of confidential computing.

tee_enableboolean

Specifies whether to enable confidential computing for the node pool.

false
managementobject

The configurations of the managed node pool feature.

enableboolean

Indicates whether the managed node pool feature is enabled. Valid values:

  • true: enables the managed node pool feature.
  • false: disables the managed node pool feature. Other parameters in this section take effect only if you set enable to true.
false
auto_repairboolean

Specifies whether to enable auto repair. This parameter takes effect only when you specify enable=true.

  • true: enables auto repair
  • false: disables auto repair.
false
upgrade_configdeprecatedobject

The configurations of auto update. This parameter takes effect only if enable is set to true.

auto_upgradeboolean

Specifies whether to enable auto update. Valid values:

  • true: enables auto update.
  • false: disables auto update.
false
surgelong

The number of additional nodes.

0
surge_percentagelong

The percentage of additional nodes to the nodes in the node pool. You must specify this parameter or the surge parameter.

0
max_unavailablelong

The maximum number of unavailable nodes. Valid values: 1 to 1000.

Default value: 1.

0
auto_repair_policyobject

The auto node repair policy.

restart_nodeboolean

Indicates whether node restart is allowed.

true
auto_vul_fixboolean

Indicates whether CVE vulnerabilities are automatically patched.

true
auto_vul_fix_policyobject

The automatic CVE patching policy.

restart_nodeboolean

Indicates whether node restart is allowed.

true
vul_levelstring

The severity level of CVEs that can be automatically patched. Separate multiple levels with commas (,).

asap,nntf
auto_upgradeboolean

Indicates whether auto update is enabled.

true
auto_upgrade_policyobject

The auto update policy.

auto_upgrade_kubeletboolean

Indicates whether the kubelet is automatically updated.

true
countdeprecatedlong

This parameter is deprecated. Use desired_size instead.

The number of nodes in the node pool.

1
interconnect_modestring

The network type of the edge node pool. This parameter takes effect only if you set the type of the node pool to edge. Valid values:

  • basic: basic
  • private: dedicated Only Kubernetes 1.22 and later support this value.
basic
interconnect_configdeprecatedobject

This parameter is deprecated.

The configurations of the edge node pool.

cen_iddeprecatedstring

This parameter is deprecated.

The ID of the Cloud Enterprise Network (CEN) instance that is associated with the enhanced edge node pool.

cen-ey9k9nfhz0f*******
ccn_iddeprecatedstring

This parameter is deprecated.

The ID of the Cloud Connect Network (CCN) instance that is associated with the enhanced edge node pool.

ccn-qm5i0i0q9yi*******
ccn_region_iddeprecatedstring

This parameter is deprecated.

The region in which the CCN instance that is associated with the enhanced edge node pool resides.

cn-shanghai
bandwidthdeprecatedlong

This parameter is deprecated.

The bandwidth of the enhanced edge node pool. Unit: Mbit/s.

10
improved_perioddeprecatedstring

This parameter is deprecated.

The subscription duration of the enhanced edge node pool. The duration is measured in months.

1
max_nodeslong

The maximum number of nodes that can be created in the edge node pool. The value of this parameter must be greater than or equal to 0. A value of 0 indicates that the number of nodes in the node pool is limited only by the quota of nodes in the cluster. In most cases, this parameter is set to a value larger than 0 for edge node pools. This parameter is set to 0 for node pools whose type is ess or default edge node pools.

10
node_configobject

The node configurations.

kubelet_configurationkubelet_config

The parameter settings of the kubelet.