ノードプールは、同じ属性を持つノードグループの論理的なコレクションであり、ノードのアップグレードや 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 |
任意 |
ノードを自動的に修復するかどうかを指定します。
デフォルト値: エラーを避けるため、enable が true に設定されていることを確認してください。 |
true |
| auto_repair_policy |
object |
任意 |
ノードの自動修復ポリシー。 |
|
| restart_node |
boolean |
任意 |
ノードの再起動を許可するかどうかを指定します。このパラメーターは
デフォルト値: |
true |
| approval_required |
boolean |
任意 |
ノード修復に手動承認が必須かどうかを指定します。 |
|
| auto_vul_fix |
boolean |
任意 |
CVE 脆弱性を自動的に修正するかどうかを指定します。
デフォルト値: エラーを避けるため、enable が true に設定されていることを確認してください。 |
true |
| auto_vul_fix_policy |
object |
任意 |
CVE 自動修正ポリシー。 |
|
| restart_node |
boolean |
任意 |
ノードの再起動を許可するかどうかを指定します。このパラメーターは
デフォルト値: |
false |
| vul_level |
string |
任意 |
自動修正が許可される脆弱性レベル(カンマ区切り)。例:
デフォルト値: |
asap,nntf |
| exclude_packages |
string |
任意 |
脆弱性修正時に除外するパッケージ。 デフォルト値: |
kernel |
| auto_upgrade |
boolean |
任意 |
ノードを自動的にアップグレードするかどうかを指定します。
デフォルト値: エラーを避けるため、enable が true に設定されていることを確認してください。 |
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 |
任意 |
オペレーティングシステムイメージタイプ。有効な値:
|
AliyunLinux3 |
| image_id |
string |
任意 |
カスタムイメージ ID。デフォルトではシステム提供のイメージが使用されます。エラーを避けるため、有効なイメージ 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 |
任意 |
Whether the provisioned ECS instances use non-root user login.
|
true |
cis_enabled
deprecated
|
boolean |
任意 |
[Deprecated] Use the security_hardening_os parameter instead. |
null |
| soc_enabled |
boolean |
任意 |
等級保護の強化を有効にするかどうかを指定します。システムイメージが Alibaba Cloud Linux 2 または Alibaba Cloud Linux 3 の場合のみ有効にできます。Alibaba Cloud は、Alibaba Cloud Linux 2 および Alibaba Cloud Linux 3 のレベル 3 等級保護イメージに対して、等級保護コンプライアンスベースラインチェック標準とスキャンプログラムを提供しています。 |
false |
| security_hardening_os |
boolean |
任意 |
Alibaba Cloud OS security hardening. Valid values:
Default value: |
false |
| internet_charge_type |
string |
任意 |
パブリック IP の課金タイプ。有効な値:
|
PayByTraffic |
| internet_max_bandwidth_out |
integer |
任意 |
ノードのパブリック IP の最大アウトバウンドパブリック帯域幅。単位: Mbps (メガビット/秒)。有効値: [1,100]。 |
5 |
| tags |
array<object> |
任意 |
Add tags only to ECS instances. Tag keys cannot be duplicated and have a maximum length of 128 characters. Tag keys and tag values cannot start with "aliyun" or "acs:", or contain "https://" or "http://". |
|
|
object |
任意 |
ノードラベル。 |
||
| key |
string |
任意 |
タグキー。 |
node-k-1 |
| value |
string |
任意 |
タグ値。 |
node-v-1 |
| desired_size |
integer |
任意 |
ノードプールの期待ノード数。 ノードプールが維持すべきノードの合計数。クラスターコンポーネントが正常に動作するように、少なくとも 2。 |
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 preferentially created. |
0 |
| on_demand_percentage_above_base_capacity |
integer |
任意 |
After the scaling group meets the minimum pay-as-you-go instance count ( |
20 |
| spot_instance_pools |
integer |
任意 |
Number of available instance types specified. The scaling group will evenly create preemptible instances using the lowest-cost instance types. Valid values: [1,10]. |
5 |
| spot_instance_remedy |
boolean |
任意 |
Whether to enable preemptible instance supplementation. When enabled, the scaling group will attempt to create new instances to replace preemptible instances that are about to be reclaimed when the reclamation notification is received. 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 business high availability and underlying disaster recovery capabilities. When creating ECS instances within a deployment set, the instances are distributed across the specified region based on the pre-configured deployment strategy. 重要 After selecting a deployment set, the maximum number of nodes in the node pool will be limited. The default node limit supported by a deployment set is 20 * number of zones (the number of zones is determined by the VSwitches). Choose carefully to ensure sufficient quota within the deployment set to avoid node provisioning failures. |
ds-bp1d19mmbsv3jf6xxxxx |
| rds_instances |
array |
任意 |
List of RDS instances. |
|
|
string |
任意 |
RDS instance ID. |
rds-**** |
|
| private_pool_options |
object |
任意 |
Private pool configuration. |
|
| id |
string |
任意 |
プライベートプール ID。 |
eap-bp67acfmxazb4**** |
| match_criteria |
string |
任意 |
プライベートプールタイプ。インスタンスの起動に使用するプライベートプールのキャパシティオプションを指定します。エラスティシティアシュアランスまたはキャパシティリザベーションが有効になると、インスタンスの起動用にプライベートプールが生成されます。有効な値:
|
Target |
security_group_id
deprecated
|
string |
任意 |
Node pool security group ID. Use either this or |
sg-wz9a8g2mt6x5llu0**** |
platform
deprecated
|
string |
任意 |
[Deprecated] Use the Operating system 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 only supported for ACK managed clusters of version 1.22 and later. |
example-role |
| instance_metadata_options | InstanceMetadataOptions |
任意 |
ECS instance metadata access configuration. |
|
| resource_pool_options |
object |
任意 |
Resource pool and resource pool strategy used when creating instances. Note the following when setting this parameter: This parameter only takes effect when creating pay-as-you-go instances. This parameter cannot be set simultaneously with private_pool_options.match_criteria or private_pool_options.id. |
|
| strategy |
string |
任意 |
インスタンスの作成時に使用するリソースプールポリシー。リソースプールには、エラスティシティアシュアランスまたはキャパシティリザベーションサービスによって生成されるプライベートプールとパブリックプールが含まれます。有効な値: PrivatePoolFirst: プライベートプール優先。このポリシーが選択され、resouce_pool_options.private_pool_ids が指定されている場合、指定されたプライベートプールが最初に使用されます。プライベートプールが指定されていないか、指定されたプライベートプールのキャパシティが不足している場合、オープンタイプのプライベートプールが自動的にマッチングされます。一致するプライベートプールがない場合、パブリックプールのリソースを使用してインスタンスが作成されます。 PrivatePoolOnly: プライベートプールのみ。このポリシーが選択されている場合、resouce_pool_options.private_pool_ids を指定する必要があります。指定されたプライベートプールのキャパシティが不足している場合、インスタンスの起動に失敗します。 None: リソースプールポリシーは使用されません。 デフォルト値: None。 |
PrivatePoolFirst |
| private_pool_ids |
array |
任意 |
プライベートプール ID のリスト。エラスティシティアシュアランス ID またはキャパシティリザベーション ID です。Target モードのプライベートプール ID のみを指定できます。N の有効な値: 1 から 20。 |
|
|
string |
任意 |
プライベートプール ID。エラスティシティアシュアランス ID またはキャパシティリザベーション ID です。Target モードのプライベートプール ID のみを指定できます。 |
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 |
任意 |
Collection of taint configurations. |
||
| 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 for cluster versions 1.12.6 and later:
Default value: |
none |
| user_data |
string |
任意 |
Instance custom data. After the node joins the cluster, the specified instance custom data script will be executed. For more information, see User-Data scripts. |
dGhpcyBpcyBhIGV4YW1wbGU= |
| unschedulable |
boolean |
任意 |
Whether nodes after scale-out are unschedulable.
|
true |
| cms_enabled |
boolean |
任意 |
Whether to install CloudMonitor on ECS nodes. After installation, you can view monitoring information of the created ECS instances in the CloudMonitor console. We recommend enabling this. Valid values:
Default value: |
false |
| node_name_mode |
string |
任意 |
Custom node name. After customizing the node name, the node name, ECS instance name, and ECS instance hostname will all be changed. 説明
For Windows instances with custom node names enabled, the hostname is fixed to the IP address with - replacing . in the IP address, without prefix or suffix. The node name consists of three parts: prefix, node IP address, and suffix:
For 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 the node joins the cluster, the specified instance pre-custom data script will be executed. For more information, see User-Data scripts. |
dGhpcyBpcyBhIGV4YW1wbGU |
| tee_config |
object |
任意 |
Trusted execution environment (TEE) cluster configuration. |
|
| tee_enable |
boolean |
任意 |
Whether to enable TEE cluster.
|
true |
interconnect_config
deprecated
|
object |
任意 |
[Deprecated] Edge node pool configuration. |
|
| cen_id |
string |
任意 |
[Deprecated] Cloud Enterprise Network (CEN) instance ID bound to the enhanced edge node pool (CENID). |
null |
| ccn_id |
string |
任意 |
[Deprecated] Cloud Connect Network (CCN) instance ID bound to the enhanced edge node pool (CCNID). |
null |
| ccn_region_id |
string |
任意 |
[Deprecated] Region of the Cloud Connect Network (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] Purchase 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 only takes effect for
|
basic |
| host_network |
boolean |
任意 |
Whether the Pod network mode uses host network mode.
|
true |
| intranet |
boolean |
任意 |
Whether nodes in the edge node pool are interconnected at Layer 3.
|
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> |
任意 |
List of node components. |
|
|
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 |
任意 |
ノードコンポーネントのカスタム設定。 |
{"cpuManagerPolicy":"static"} |
|
string |
任意 |
ノードコンポーネントのカスタム設定文字列 |
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-****"
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。