查询符合条件的节点池信息列表。
调用该 API 时的请求参数如下,除此之外还需传入公共请求参数。公共请求参数说明,请参见 公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListNodePools | 接口名称。当前 API 的名称为 ListNodePools 。 |
Version | String | 是 | 2022-05-12 | 接口版本。当前 API 的版本为 2022-05-12 。 |
Filter | Object of ListNodePoolsFilter | 否 | - | 待查询节点池的筛选条件。 |
Tags | Array of ListTagFilter | 否 | - | 基于标签查询节点池列表。
|
PageNumber | Integer | 否 | 1 | 分页查询时的起始页码,从 1 开始,默认为 1。 |
PageSize | Integer | 否 | 10 | 分页查询时每页显示的记录数,取值:
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
ClusterIds | Array of String | 否 | ["cc5silumrsfeq****"] | 集群 ID。 说明 此参数为空数组时,基于账号下指定地域的所有集群进行筛选。 |
Ids | Array of String | 否 | ["pc51i0m6rsfen****"] | 节点池 ID 列表。 |
Name | String | 否 | test-nodepool | 节点池名称。 说明 此参数为空时,返回指定集群内所有的节点池信息。 |
AutoScaling.Enabled | Boolean | 否 | true | 节点池弹性伸缩配置信息,取值:
|
Statuses | Array of NodePoolStatusFilter | 否 | - | 节点池状态。 |
CreateClientToken | String | 否 | ed6b1190-dc17-11ec-9519-eb58a7****** | 创建成功时的 ClientToken。 |
UpdateClientToken | String | 否 | ed6b1190-dc17-11ec-9519-eb58a7****** | 最后一次更新成功时 ClientToken。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Phase | String | 否 | Running | 节点池的状态,取值:
注意 Phase 和 Conditions.Type 两者至少有一个参数必填,否则为无效数组元素。合法的 Phase 和 Conditions.Type 组合请参见 资源状态说明。 |
Conditions.Type | String | 否 | Ok | 节点池当前主状态下的状态条件,即进入该主状态的原因,可以有多个原因,取值:
注意 Phase 和 Conditions.Type 两者至少有一个参数必填,否则为无效数组元素。合法的 Phase 和 Conditions.Type 组合请参见 资源状态说明。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Key | String | 是 | key | 标签键。
|
Value | String | 否 | value | 标签值,可以为空。
|
POST https://open.volcengineapi.com/?Action=ListNodePools&Version=2022-05-12 HTTP/1.1 Content-Type:application/json { "PageNumber": 1, "PageSize": 10, "Filter": { "ClusterIds": [ "cc5silumrsfeq****" ], "Statuses": [ { "Phase": "Running", "Conditions.Type": "Ok" } ] }, "Tags": [ { "Key": "key", "Value": "value" } ] }
本接口返回参数如下表所示,公共返回参数请参见 返回结果。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Items | Array of NodePool | - | 节点池列表。 |
TotalCount | Integer | 100 | 符合条件的节点池总数。 |
PageNumber | Integer | 1 | 当前页码。 |
PageSize | Integer | 10 | 每页显示的节点池数。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | pc51i0m6******** | 节点池 ID。 |
CreateClientToken | String | BC028527-33B9-4990-A633-84E9F9****** | 创建成功时的 ClientToken。 |
UpdateClientToken | String | BC028527-33B9-4990-A633-84E9F9****** | 最后一次更新成功时的 ClientToken。 |
ClusterId | String | cc5silum******** | 集群 ID。 |
Name | String | test-nodepool | 节点池名称。 |
KubernetesConfig | Object of NodePoolKubernetesConfigResponse | - | 节点池 Kubernetes 配置。 |
NodeConfig | Object of NodePoolNodeConfigResponse | - | 节点池中云服务器实例配置。 |
AutoScaling | Object of NodePoolAutoScalingResponse | - | 节点池伸缩策略配置。 |
CreateTime | String | 2021-10-27T10:33:30Z | 创建节点池的时间。 |
UpdateTime | String | 2021-10-29T10:33:30Z | 更新节点池的时间。 |
Status | Object of NodePoolStatus | - | 节点池状态。 |
NodeStatistics | Object of NodeStatistics | - | 节点池中的节点统计。 |
Tags | Array of TagResponse | - | 节点池绑定的标签信息。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Labels | Array of Label | - | 节点池/节点的 Kubernetes 标签(Labels)信息。 |
Taints | Array of Taint | - | 节点池/节点的 Kubernetes 污点(Taints)信息。 |
Cordon | Boolean | false | 封锁节点配置,参数值说明:
|
NamePrefix | String | xxx- | Kubernetes 中节点对象的元数据名称前缀。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Key | String | label-key | 标签键。 |
Value | String | label-value | 标签值。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Effect | String | NoSchedule | 污点效果,参数值说明:
|
Key | String | taint-key | 污点键。 |
Value | String | taint-value | 污点值。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
InstanceTypeIds | Array of String | ["ecs.g1ie.large"] | 节点对应的云服务器实例规格 ID 列表。 |
SubnetIds | Array of String | ["subnet-3rf6vwbgkg****"] | 节点网络所属的子网 ID 列表。 |
ImageId | String | image-kd******** | 节点对应云服务器所使用的镜像 ID。 |
SystemVolume | Object of SystemVolume | - | 节点的系统盘配置。 |
DataVolumes | Array of DataVolume | - | 节点的数据盘配置。 |
InitializeScript | String | ZWNobyAidG****** | 创建并初始化节点后执行的自定义脚本。 |
Security | Object of NodeSecurityResponse | - | 节点安全配置。 |
AdditionalContainerStorageEnabled | Boolean | false | 节点的第一块数据盘是否已配置并格式化挂载作为容器镜像和日志的存储目录,参数值说明:
|
InstanceChargeType | String | PostPaid | 云服务器实例计费类型,参数值说明:
|
Period | Integer | 12 | 云服务器实例购买时长,单位为月。 |
AutoRenew | Boolean | true | 云服务器实例到期是否自动续费,参数值说明:
|
AutoRenewPeriod | Integer | 1 | 云服务器实例每次自动续费时长,单位为月。 |
NamePrefix | String | prefix-name | 节点名称前缀,为空字符串或 nil 时表示未开启节点名称前缀策略。 |
HpcClusterIds | Array of String | ["hpcCluster-1"] | 高性能计算集群 ID。 |
Tags | Array of Tag | - | 节点对应 ECS 实例绑定的标签信息。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Type | String | ESSD_PL0 | 云盘类型:
|
Size | Integer | 40 | 云盘容量,单位 GiB。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Type | String | ESSD_PL0 | 磁盘类型:
|
Size | Integer | 20 | 磁盘容量,单位 GiB。 |
MountPoint | String | /vke | 磁盘格式化后的目标挂载目录。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
SecurityGroupIds | Array of String | ["sg-2byy13cnsczyxxxx"] | 节点网络所在的安全组 ID 列表。 |
SecurityStrategyEnabled | Boolean | true | 节点是否启用了安全加固配置,参数值说明:
|
SecurityStrategies | Array of String | ["Hids"] | 节点的安全策略,参数值说明: |
Login | Object of NodeLoginResponse | - | 节点的访问方式配置。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Type | String | Password | 节点的访问登录方式,参数值说明:
|
SshKeyPairName | String | test-key | SSH 密钥对名称。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Key | String | key | 标签键。 |
Value | String | value | 标签值。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Enabled | Boolean | false | 配置节点池弹性伸缩功能开关,参数值说明:
|
MaxReplicas | Integer | 10 | 配置节点池的最大节点数。 |
MinReplicas | Integer | 0 | 配置节点池的最小节点数。 |
DesiredReplicas | Integer | 0 | 配置节点池的期望节点数。 |
Priority | Integer | 10 | 优先级。 说明 仅针对节点池开启弹性伸缩功能且扩容算法为 |
SubnetPolicy | String | ZoneBalance | 节点池的多子网调度策略,参数值说明:
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Phase | String | Running | 节点池的状态,参数值有:
说明 合法的 Phase 和 Conditions.Type 组合说明,请参见 资源状态说明。 |
Conditions | Array of NodePoolStatusCondition | - | 节点池当前主状态下的状态条件,即进入该主状态的原因。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Type | String | Ok | 节点池当前主状态下的状态条件,即进入该主状态的原因,可以有多个原因,参数值有:
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
TotalCount | Integer | 8 | 节点总数量。 |
CreatingCount | Integer | 1 | Phase=Creating 的节点总数量。 |
RunningCount | Integer | 1 | Phase=Running 的节点总数量。 |
UpdatingCount | Integer | 1 | Phase=Updating 的节点总数量。 |
DeletingCount | Integer | 1 | Phase=Deleting 的节点总数量。 |
FailedCount | Integer | 1 | Phase=Failed 的节点总数量。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Key | String | key | 标签键。 |
Value | String | value | 标签值。 |
Type | String | Custom | 标签类型,参数值说明:
|
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "0216353********", "Action": "ListNodePools", "Version": "2022-05-12", "Service": "vke", "Region": "cn-beijing" }, "Result": { "Items": [ { "Id": "pc51i0m6********", "Name": "test-nodepool", "ClusterId": "cc5silum********", "KubernetesConfig": { "Labels": [ { "Key": "label-key", "Value": "label-value" } ], "Taints": [ { "Key": "taint-key", "Value": "taint-value", "Effect": "NoSchedule" } ], "Cordon": false }, "NodeConfig": { "InstanceTypeIds": [ "ecs.g1.large" ], "SubnetIds": [ "subnet-3rf6vwbgkg****" ], "ImageId": "image-kd********", "SystemVolume": { "Type": "ESSD_PL0", "Size": 40 }, "DataVolumes": [ { "Type": "ESSD_PL0", "Size": 20 } ], "AdditionalContainerStorageEnabled": true, "InitializeScript": "ZWNobyAidG******", "Security": { "SecurityGroupIds": [ "sg-2byy13cnsczy****" ], "SecurityStrategyEnabled": true, "SecurityStrategies": [ "Hids" ], "Login": { "Type": "Password", "SshKeyPairName": "" } }, "InstanceChargeType": "PostPaid", "Period": 0, "AutoRenew": false, "AutoRenewPeriod": 0, "NamePrefix": "name-prefix" }, "AutoScaling": { "Enabled": true, "DesiredReplicas": 1, "MinReplicas": 0, "MaxReplicas": 10, "Priority": 10, "SubnetPolicy": "Priority" }, "Status": { "Phase": "Running", "Conditions": [ { "Type": "Ok" } ] }, "NodeStatistics": { "TotalCount": 1, "CreatingCount": 0, "RunningCount": 1, "UpdatingCount": 0, "DeletingCount": 0, "FailedCount": 0 }, "Tags": [ { "Key": "key", "Value": "value", "Type": "Custom" } ], "CreateClientToken": "BB928624-11C0-4856-A233-84F9F9******", "UpdateClientToken": "BC028527-33B9-4990-A633-54A859******", "CreateTime": "2022-05-11T17:01:23+08:00", "UpdateTime": "2022-05-12T17:01:23+08:00" } ], "PageNumber": 1, "PageSize": 10, "TotalCount": 1 } }
本接口无专有错误码,公共错误码请参见 公共错误码。