ノードプールは、同じ属性を持つノードの論理的なコレクションであり、ノードのアップグレードや auto scaling などのノードの統合管理と運用保守を可能にします。ノードプールの自動化された運用保守機能をさらに活用して、OS の CVE 脆弱性の自動パッチ適用、障害ノードの自動復旧、kubelet および containerd バージョンの自動アップグレードなどの特徴を使用し、運用保守コストを削減できます。CreateClusterNodePool を呼び出して、クラスターのノードプールを作成できます。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cs:CreateClusterNodePool |
create |
*Cluster
|
なし | なし |
リクエスト構文
POST /clusters/{ClusterId}/nodepools HTTP/1.1
パスパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ClusterId |
string |
必須 |
クラスター ID。 |
c61da77e8bfbc4c4c999af2b51b65**** |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| body |
object |
任意 |
リクエスト本文パラメーター。 |
|
| nodepool_info |
object |
任意 |
ノードプールの構成。 |
|
| name |
string |
必須 |
ノードプール名。 |
nodepool-test |
| type |
string |
任意 |
ノードプールタイプ。有効な値:
列挙値:
|
ess |
| resource_group_id |
string |
任意 |
ノードプールのリソースグループ ID。ノードプールによって作成されたインスタンスはこのリソースグループに属します。 リソースは 1 つのリソースグループにのみ属することができます。さまざまなビジネスシナリオに基づいて、リソースグループをプロジェクト、アプリケーション、組織などの概念にマッピングできます。 |
rg-acfmyvw3wjmb**** |
| auto_scaling |
object |
任意 |
auto scaling の構成。 |
|
| enable |
boolean |
任意 |
auto scaling を有効にするかどうかを指定します。有効な値:
このパラメーターが false に設定されている場合、 デフォルト値: |
false |
| type |
string |
任意 |
auto scaling のスケーリングインスタンスタイプ。
デフォルト値: 重要 このフィールドはノードプール作成後に変更できません。 列挙値:
|
cpu |
| max_instances |
integer |
任意 |
ノードプールでスケーリングできるインスタンスの最大数(既存のインスタンスを除く)。 有効値: [min_instances, 2000]。デフォルト値: 0。 |
10 |
| min_instances |
integer |
任意 |
ノードプールでスケーリングできるインスタンスの最小値(既存のインスタンスを除く)。 有効値: [0, max_instances]。デフォルト値: 0。 説明
|
1 |
is_bond_eip
deprecated
|
boolean |
任意 |
[非推奨] このフィールドは非推奨です。代わりに internet_charge_type と internet_max_bandwidth_out を使用してください。 EIP をバインドするかどうかを指定します。有効な値:
デフォルト値: |
null |
eip_internet_charge_type
deprecated
|
string |
任意 |
[非推奨] 代わりに internet_charge_type と internet_max_bandwidth_out を使用してください。 EIP の課金方法。有効な値:
デフォルト値: |
null |
eip_bandwidth
deprecated
|
integer |
任意 |
[非推奨] 代わりに internet_charge_type と internet_max_bandwidth_out を使用してください。 EIP の最大帯域幅。単位: Mbps。 |
null |
| management |
object |
任意 |
ノードプールのマネージド特徴の構成。 |
|
| enable |
boolean |
任意 |
ノードプールのマネージド特徴を有効にするかどうかを指定します。有効な値:
デフォルト値: false。 |
false |
| auto_repair |
boolean |
任意 |
ノードを自動的に修復するかどうかを指定します。
デフォルト値: |
true |
| auto_repair_policy |
object |
任意 |
ノードの自動修復ポリシー。 |
|
| restart_node |
boolean |
任意 |
ノードの再起動を許可するかどうかを指定します。このパラメーターは
デフォルト値: |
true |
| approval_required |
boolean |
任意 |
ノード修復に手動承認が必須かどうかを指定します。 |
|
| auto_vul_fix |
boolean |
任意 |
CVE 脆弱性を自動的に修正するかどうかを指定します。
デフォルト値: |
true |
| auto_vul_fix_policy |
object |
任意 |
CVE 自動修正ポリシー。 |
|
| restart_node |
boolean |
任意 |
ノードの再起動を許可するかどうかを指定します。このパラメーターは
デフォルト値: |
false |
| vul_level |
string |
任意 |
自動修正が許可される脆弱性レベル (カンマ区切り)。例:
デフォルト値: |
asap,nntf |
| exclude_packages |
string |
任意 |
脆弱性修正時に除外するパッケージ。 デフォルト値: |
kernel |
| auto_upgrade |
boolean |
任意 |
ノードを自動的にアップグレードするかどうかを指定します。
デフォルト値: |
true |
| auto_upgrade_policy |
object |
任意 |
ノードの自動アップグレードポリシー。 |
|
| auto_upgrade_kubelet |
boolean |
任意 |
kubelet の自動スペックアップを許可するかどうかを指定します。このパラメーターは
デフォルト値: |
true |
| auto_upgrade_runtime |
boolean |
任意 |
ランタイムの自動スペックアップを許可するかどうかを指定します。このパラメーターは
デフォルト値: |
false |
| auto_upgrade_os |
boolean |
任意 |
オペレーティングシステムの自動スペックアップを許可するかどうかを指定します。このパラメーターは
デフォルト値: |
false |
upgrade_config
deprecated
|
object |
任意 |
[非推奨] 代わりに親レベルの 自動アップグレードの構成。 |
|
auto_upgrade
deprecated
|
boolean |
任意 |
[非推奨] 代わりに上位レベルの 自動スペックアップを有効にするかどうかを指定します。有効な値:
|
null |
| surge |
integer |
任意 |
追加ノードの数。このパラメーターまたは スペックアップ中にノードが使用不可になります。追加ノードを作成して、クラスターのワークロードを補うことができます。 説明
追加ノードの数は、現在のノード数を超えないようにしてください。 |
0 |
| surge_percentage |
integer |
任意 |
追加ノードの割合。このパラメーターまたは 追加ノード数 = 追加ノード割合 × ノード数。例えば、追加ノード割合が 50% で既存ノードが 6 つの場合、追加ノード数 = 50% × 6 = 3。 |
0 |
| max_unavailable |
integer |
任意 |
使用不可ノードの最大値。 有効値: [1,1000]。 デフォルト値: 1。 |
1 |
| auto_fault_diagnosis |
boolean |
任意 |
||
| scaling_group |
object |
任意 |
ノードプールのスケーリンググループ構成。 |
|
| vswitch_ids |
array |
必須 |
vSwitch ID のリスト。有効値: [1,8]。 説明
高可用性を確保するため、異なるゾーンの vSwitch を選択することを推奨します。 |
|
|
string |
任意 |
vSwitch ID。 |
vsw-wz9mfnhmssud6eicu**** |
|
| instance_types |
array |
必須 |
ノードプールのノードインスタンスタイプのリスト。ノードプールがスケールアウトする際、指定されたリストから要件を満たすインスタンスタイプが選択されてインスタンスが作成されます。 サポートされるインスタンスタイプ数: [1,10] 説明
高可用性を確保するため、複数のインスタンスタイプを選択することを推奨します。 |
|
|
string |
任意 |
インスタンスタイプ。詳細については、インスタンスファミリーを参照してください。 |
ecs.d1ne.2xlarge |
|
| instance_charge_type |
string |
必須 |
ノードプール内のノードの課金方法。有効な値:
デフォルト値: 列挙値:
|
PostPaid |
| period |
integer |
任意 |
ノードプール内のノードのサブスクリプション期間。
|
1 |
| period_unit |
string |
任意 |
ノードプール内のノードの課金期間単位。
デフォルト値: |
Month |
| auto_renew |
boolean |
任意 |
ノードプール内のノードの自動更新を有効にするかどうかを指定します。
デフォルト値: |
true |
| auto_renew_period |
integer |
任意 |
各自動更新の持続時間。有効な値:
デフォルト値: 1。 |
1 |
| spot_strategy |
string |
任意 |
プリエンプティブルインスタンスタイプ。有効な値:
詳細については、プリエンプティブルインスタンスを参照してください。 |
NoSpot |
| spot_price_limit |
array<object> |
任意 |
単一のプリエンプティブルインスタンスタイプの市場価格範囲の構成。 |
|
|
object |
任意 |
プリエンプティブルインスタンスの市場価格範囲の構成。インスタンスタイプごとに異なる価格範囲を設定できます。 |
||
| instance_type |
string |
任意 |
スポットインスタンスタイプ。 |
ecs.c6.large |
| price_limit |
string |
任意 |
インスタンスあたりの最大値価格。 単位: USD/時間。。 |
0.39 |
| image_type |
string |
任意 |
OS イメージタイプ。有効な値:
|
AliyunLinux3 |
| image_id |
string |
任意 |
カスタムイメージ ID。デフォルトではシステム提供のイメージが使用されます。 |
aliyun_2_1903_x64_20G_alibase_20200529.vhd |
| system_disk_category |
string |
任意 |
ノードのシステムディスクタイプ。有効な値:
デフォルト値: |
cloud_efficiency |
| system_disk_categories |
array |
任意 |
システムディスクの複数のディスクタイプ。優先度の高いディスクタイプが使用できない場合、次の優先度のディスクタイプが自動的に使用されてシステムディスクが作成されます。 |
|
|
string |
任意 |
ノードの複数のシステムディスクタイプ。 有効な値:
|
cloud_essd |
|
| system_disk_size |
integer |
任意 |
ノードのシステムディスクサイズ。単位: GiB。 有効値: [20,2048]。 |
120 |
| system_disk_performance_level |
string |
任意 |
ノードのシステムディスクのパフォーマンスレベル。ESSD ディスクにのみ適用されます。パフォーマンスレベルはディスクサイズに関連します。詳細については、 ESSD を参照してください。
|
PL1 |
| system_disk_encrypted |
boolean |
任意 |
システムディスクを暗号化するかどうかを指定します。有効な値:
|
false |
| system_disk_kms_key_id |
string |
任意 |
システムディスクで使用される KMS キー ID。 |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| system_disk_encrypt_algorithm |
string |
任意 |
システムディスクで使用される暗号化アルゴリズム。有効な値: aes-256。 |
aes-256 |
| system_disk_bursting_enabled |
boolean |
任意 |
ノードのシステムディスクのバースト(パフォーマンスバースト)を有効にするかどうかを指定します。有効な値:
このパラメーターは |
true |
| system_disk_provisioned_iops |
integer |
任意 |
ノードのシステムディスクの事前構成された読み取り/書き込み IOPS。 有効値: 0 ~ min{50,000, 1000*容量 - ベースラインパフォーマンス}。ベースラインパフォーマンス = min{1,800+50*容量, 50000}。 このパラメーターは |
1000 |
| data_disks |
array |
任意 |
ノードプール内のノードのデータディスク構成。 |
|
| data_disk |
任意 |
データディスクの構成。 |
||
| disk_init |
array |
任意 |
ブロックデバイスの初期化構成。 |
|
|
DiskInit |
任意 |
DiskInit の構成。 |
||
| security_group_ids |
array |
任意 |
セキュリティグループ ID のリスト。 |
|
|
string |
任意 |
セキュリティグループ ID のリスト。 |
sg-wz9a8g2mt6x5ll****** |
|
| key_pair |
string |
任意 |
パスワードレスログイン用のキーペア名。 説明
ノードプールが ContainerOS オペレーティングシステムを使用する場合、 |
np-key-name |
| login_password |
string |
任意 |
SSH ログインパスワード。 |
**** |
| login_as_non_root |
boolean |
任意 |
作成された ECS インスタンスが非ルートユーザーでログインするかどうかを指定します。
|
true |
cis_enabled
deprecated
|
boolean |
任意 |
[非推奨] 代わりに security_hardening_os パラメーターを使用してください。 |
null |
| soc_enabled |
boolean |
任意 |
等級保護セキュリティ強化を有効にするかどうかを指定します。等級保護強化は、システムイメージが Alibaba Cloud Linux 2 または Alibaba Cloud Linux 3 に設定されている場合にのみノードで有効にできます。Alibaba Cloud は、Alibaba Cloud Linux 2 および Alibaba Cloud Linux 3 イメージに対して等級保護 2.0 レベル III のベースラインチェック標準とスキャンプログラムを提供しています。 |
false |
| security_hardening_os |
boolean |
任意 |
Alibaba Cloud OS セキュリティ強化。有効な値:
デフォルト値: |
false |
| internet_charge_type |
string |
任意 |
パブリック IP の課金方法。有効な値:
|
PayByTraffic |
| internet_max_bandwidth_out |
integer |
任意 |
ノードの最大アウトバウンドパブリック帯域幅。単位: Mbps(メガビット/秒)。有効値: [1,100]。 |
5 |
| tags |
array<object> |
任意 |
ECS インスタンスにのみ追加されるタグ。 タグキーは重複できず、最大 128 文字です。タグキーとタグ値は "aliyun" または "acs:" で始めることはできず、"https://" または "http://" を含めることはできません。 |
|
|
object |
任意 |
ノードラベル。 |
||
| key |
string |
任意 |
The tag key. |
node-k-1 |
| value |
string |
任意 |
The tag value. |
node-v-1 |
| desired_size |
integer |
任意 |
Desired number of nodes in the node pool. The total number of nodes that the node pool should maintain. We recommend configuring at least 2 nodes to ensure proper running of cluster components. You can scale in or out the node pool by adjusting the desired node count. If no nodes need to be created, set this to 0 and manually adjust the node count later. |
0 |
| multi_az_policy |
string |
任意 |
Multi-zone scaling group ECS instance scaling policy. Valid values:
Default value: |
COST_OPTIMIZED |
| scaling_policy |
string |
任意 |
Scaling group mode. Valid values:
Default value: |
release |
| on_demand_base_capacity |
integer |
任意 |
Minimum number of pay-as-you-go instances required by the scaling group. Valid values: [0,1000]. When the number of pay-as-you-go instances is less than this value, pay-as-you-go instances are created first. |
0 |
| on_demand_percentage_above_base_capacity |
integer |
任意 |
Percentage of pay-as-you-go instances among the excess instances after the scaling group meets the minimum pay-as-you-go instance requirement ( |
20 |
| spot_instance_pools |
integer |
任意 |
Number of available instance types. The scaling group creates preemptible instances in a balanced manner among the lowest-cost instance types. Valid values: [1,10]. |
5 |
| spot_instance_remedy |
boolean |
任意 |
Whether to enable supplementing preemptible instances. When enabled, the scaling group attempts to create new instances to replace preemptible instances that are about to be reclaimed. Valid values:
|
false |
| compensate_with_on_demand |
boolean |
任意 |
When
|
true |
| deploymentset_id |
string |
任意 |
Deployment set ID. You can use a deployment set to distribute ECS instances created by the node pool across different physical servers to ensure high availability and disaster recovery capabilities. When creating ECS instances in a deployment set, instances are distributed across the specified region based on the pre-configured deployment policy. 重要 After a deployment set is selected, the maximum number of nodes in the node pool is limited. The default upper limit for nodes in a deployment set is 20 × number of zones (the number of zones is determined by vSwitches). Choose carefully and ensure sufficient quota in the deployment set to avoid node creation failures. |
ds-bp1d19mmbsv3jf6xxxxx |
| rds_instances |
array |
任意 |
RDS instance list. |
|
|
string |
任意 |
RDS instance ID. |
rds-**** |
|
| private_pool_options |
object |
任意 |
Private pool configuration. |
|
| id |
string |
任意 |
The private pool ID. When |
eap-bp67acfmxazb4**** |
| match_criteria |
string |
任意 |
The type of the private pool. This parameter specifies the private pool capacity option for instance launch. After an elasticity assurance or capacity reservation takes effect, a private pool is generated for instances to use during launch. Valid values:
|
Target |
security_group_id
deprecated
|
string |
任意 |
Security group ID for the node pool. Mutually exclusive with |
sg-wz9a8g2mt6x5llu0**** |
platform
deprecated
|
string |
任意 |
[Deprecated] Use the OS distribution. Valid values:
Default value: |
null |
| instance_patterns |
array |
任意 |
Instance attribute configuration. |
|
| instance_patterns |
任意 |
Instance attributes. |
||
| ram_role_name |
string |
任意 |
Worker RAM role name.
重要 This parameter is supported only for ACK managed clusters of version 1.22 or later. |
example-role |
| instance_metadata_options | InstanceMetadataOptions |
任意 |
ECS instance metadata access configuration. |
|
| resource_pool_options |
object |
任意 |
Resource pool and resource pool policy used when creating instances. Note the following when you set this parameter: This parameter takes effect only when creating pay-as-you-go instances. This parameter cannot be set together with private_pool_options.match_criteria or private_pool_options.id. |
|
| strategy |
string |
任意 |
The resource pool policy used when creating instances. Resource pools include private pools generated by elasticity assurance or capacity reservation services and public pools, which are available for instance launch. Valid values: PrivatePoolFirst: private pool first. When this policy is selected and resouce_pool_options.private_pool_ids is specified, the specified private pools are used first. If no private pools are specified or the specified private pool capacity is insufficient, open-type private pools are automatically matched. If no matching private pools are available, public pool resources are used to create instances. PrivatePoolOnly: private pool only. When this policy is selected, resouce_pool_options.private_pool_ids must be specified. If the specified private pool capacity is insufficient, the instance fails to launch. None: no resource pool policy is used. Default value: None. |
PrivatePoolFirst |
| private_pool_ids |
array |
任意 |
The list of private pool IDs, which are elasticity assurance IDs or capacity reservation IDs. Only Target mode private pool IDs can be specified. Valid values of N: 1 to 20. |
|
|
string |
任意 |
The private pool ID, which is an elasticity assurance ID or capacity reservation ID. Only Target mode private pool IDs can be specified. |
eap-bp67acfmxazb4**** |
|
| system_disk_snapshot_policy_id |
string |
任意 |
System disk snapshot policy. |
sp-0jl6xnmme8v7o935**** |
| node_config |
object |
任意 |
Node configuration. |
|
| kubelet_configuration | kubelet_config |
任意 |
Kubelet parameter configuration. |
|
| kubernetes_config |
object |
任意 |
Cluster-related configuration. |
|
| labels |
array |
任意 |
Node labels. Add labels to Kubernetes cluster nodes. |
|
| tag |
任意 |
Label configuration. |
||
| taints |
array |
任意 |
Taint configuration. |
|
| taint |
任意 |
Taint configuration collection. |
||
| runtime |
string |
任意 |
Container runtime name. ACK supports the following three container runtimes.
Default value: containerd. |
containerd |
| runtime_version |
string |
任意 |
Container runtime version. |
1.6.38 |
| cpu_policy |
string |
任意 |
Node CPU management policy. The following two policies are supported when the cluster version is 1.12.6 or later:
Default value: |
none |
| user_data |
string |
任意 |
Instance custom data. After a node joins the cluster, the specified instance custom data script is run. For more information, see User-Data scripts. |
dGhpcyBpcyBhIGV4YW1wbGU= |
| unschedulable |
boolean |
任意 |
Whether scaled-out nodes are unschedulable.
|
true |
| cms_enabled |
boolean |
任意 |
Whether to install CloudMonitor on ECS nodes. After installation, you can view monitoring information for created ECS instances in the CloudMonitor console. We recommend enabling this. Valid values:
Default value: |
false |
| node_name_mode |
string |
任意 |
Custom node name. After setting a custom node name, the node name, ECS instance name, and ECS instance hostname are all changed accordingly. 説明
For Windows instances with custom node names enabled, the hostname is fixed to the IP address with "-" replacing "." in the IP address, and does not include the prefix or suffix. A node name consists of three parts: prefix, node IP address, and suffix:
Example: If the node IP address is 192.XX.YY.55, the prefix is aliyun.com, and the suffix is test:
|
aliyun.com192.XX.YY.55test |
| pre_user_data |
string |
任意 |
Instance pre-custom data. Before a node joins the cluster, the specified instance pre-custom data script is run. For more information, see User-Data scripts. |
dGhpcyBpcyBhIGV4YW1wbGU |
| tee_config |
object |
任意 |
Confidential computing cluster configuration. |
|
| tee_enable |
boolean |
任意 |
Whether to enable confidential computing for the cluster.
|
true |
interconnect_config
deprecated
|
object |
任意 |
[Deprecated] Edge node pool configuration. |
|
| cen_id |
string |
任意 |
[Deprecated] CEN instance ID (CEN ID) bound to the enhanced edge node pool. |
null |
| ccn_id |
string |
任意 |
[Deprecated] CCN instance ID (CCN ID) bound to the enhanced edge node pool. |
null |
| ccn_region_id |
string |
任意 |
[Deprecated] Region of the CCN instance bound to the enhanced edge node pool. |
null |
| bandwidth |
integer |
任意 |
[Deprecated] Network bandwidth of the enhanced edge node pool. Unit: Mbps. |
null |
| improved_period |
string |
任意 |
[Deprecated] Subscription duration of the enhanced edge node pool. Unit: months. |
null |
count
deprecated
|
integer |
任意 |
[Deprecated] Use desired_size instead. Number of nodes in the node pool. |
null |
max_nodes
deprecated
|
integer |
任意 |
[Deprecated] Maximum number of nodes allowed in the edge node pool. |
null |
| interconnect_mode |
string |
任意 |
Network type of the edge node pool. This parameter takes effect only for node pools of
|
basic |
| host_network |
boolean |
任意 |
Whether the Pod network mode uses host network mode.
|
true |
| intranet |
boolean |
任意 |
Whether nodes in the edge node pool have Layer 3 network connectivity.
|
true |
| eflo_node_group |
object |
任意 |
Lingjun node pool configuration. |
|
| cluster_id |
string |
任意 |
Lingjun cluster ID to associate when creating a Lingjun node pool. |
i1169130516633730**** |
| group_id |
string |
任意 |
Lingjun group ID of the Lingjun cluster to associate when creating a Lingjun node pool. |
ng-ec3c96ff0aa**** |
| auto_mode |
object |
任意 |
Node pool intelligent managed configuration. |
|
| enable |
boolean |
任意 |
Whether to enable intelligent managed mode. Valid values:
|
true |
| node_components |
array<object> |
任意 |
Node component list. |
|
|
array<object> |
任意 |
Node component. |
||
| name |
string |
任意 |
Node component name. |
kubelet |
| version |
string |
任意 |
Node component version. |
1.33.3-aliyun.1 |
| config |
object |
任意 |
Node component configuration. |
|
| custom_config |
object |
任意 |
The custom configuration of the node component. |
{"cpuManagerPolicy":"static"} |
|
any |
任意 |
The custom configuration string of the node component. |
cpuManagerPolicy |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
Node pool configuration. |
||
| nodepool_id |
string |
Node pool ID. |
np31da1b38983f4511b490fc62108a**** |
| task_id |
string |
Task ID. |
T-613b19bbd160ad492800**** |
| request_id |
string |
Request ID. |
0527ac9a-c899-4341-a21a-**** |
例
成功レスポンス
JSONJSON
{
"nodepool_id": "np31da1b38983f4511b490fc62108a****",
"task_id": "T-613b19bbd160ad492800****",
"request_id": "0527ac9a-c899-4341-a21a-****"
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。