调用DescribeClusterNodePoolDetail查询集群指定节点池详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求语法
GET /clusters/ClusterId/nodepools/NodepoolId HTTP/1.1
Content-Type:application/json
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
ClusterId | String | 是 | c23421cfa74454bc8b37163fd19af**** |
集群ID。 |
NodepoolId | String | 是 | np31da1b38983f4511b490fc62108a**** |
节点池ID。 |
响应体语法
HTTP/1.1 200
Content-Type:application/json
{
"auto_scaling" : {
"eip_bandwidth" : Long,
"eip_internet_charge_type" : "String",
"enable" : Boolean,
"is_bond_eip" : Boolean,
"max_instances" : Long,
"min_instances" : Long,
"type" : "String"
},
"kubernetes_config" : {
"cms_enabled" : Boolean,
"cpu_policy" : "String",
"labels" : [ {
"key" : "String",
"value" : "String"
} ],
"runtime" : "String",
"runtime_version" : "String",
"taints" : [ {
"key" : "String",
"value" : "String",
"effect" : "String"
} ],
"user_data" : "String"
},
"nodepool_info" : {
"created" : "String",
"is_default" : Boolean,
"name" : "String",
"nodepool_id" : "String",
"region_id" : "String",
"resource_group_id" : "String",
"type" : "String",
"updated" : "String"
},
"scaling_group" : {
"auto_renew" : Boolean,
"auto_renew_period" : Long,
"data_disks" : [ {
"category" : "String",
"size" : Long,
"encrypted" : "String",
"auto_snapshot_policy_id" : "String"
} ],
"image_id" : "String",
"instance_charge_type" : "String",
"instance_types" : [ "String" ],
"multi_az_policy" : "String",
"on_demand_base_capacity" : Long,
"on_demand_percentage_above_base_capacity" : Long,
"spot_instance_pools" : Long,
"spot_instance_remedy" : Boolean,
"compensate_with_on_demand" : Boolean,
"period" : Long,
"period_unit" : "String",
"platform" : "String",
"ram_policy" : "String",
"spot_strategy" : "String",
"spot_price_limit" : [ {
"instance_type" : "String",
"price_limit" : "String"
} ],
"rds_instances" : [ "String" ],
"scaling_group_id" : "String",
"scaling_policy" : "String",
"security_group_id" : "String",
"system_disk_category" : "String",
"system_disk_size" : Long,
"tags" : [ {
"key" : "String",
"value" : "String"
} ],
"vswitch_ids" : [ "String" ],
"login_password" : "String",
"key_pair" : "String"
},
"status" : {
"failed_nodes" : Long,
"healthy_nodes" : Long,
"initial_nodes" : Long,
"offline_nodes" : Long,
"removing_nodes" : Long,
"serving_nodes" : Long,
"state" : "String",
"total_nodes" : Long
},
"tee_config" : {
"tee_enable" : Boolean
},
"management" : {
"enable" : Boolean,
"auto_repair" : Boolean,
"upgrade_config" : {
"auto_upgrade" : Boolean,
"surge" : Long,
"surge_percentage" : Long,
"max_unavailable" : Long
}
}
}
响应参数
参数名称 | 类型 | 示例 | 说明 |
---|---|---|---|
auto_scaling | object |
自动伸缩节点池配置。 |
|
eip_bandwidth | Long | 5 |
EIP带宽峰值。 |
eip_internet_charge_type | String | PayByBandwidth |
EIP计费类型,取值:
|
enable | Boolean | true |
是否启用自动伸缩。
|
is_bond_eip | Boolean | true |
是否绑定EIP,取值:
|
max_instances | Long | 10 |
最大实例数。 |
min_instances | Long | 1 |
最小实例数。 |
type | String | cpu |
自动伸缩类型,按照自动伸缩实例类型划分。取值:
|
kubernetes_config | object |
集群相关配置。 |
|
cms_enabled | Boolean | true |
是否在ECS节点上安装云监控,安装后可以在云监控控制台查看所创建ECS实例的监控信息,推荐开启。取值:
|
cpu_policy | String | none |
节点CPU管理策略。当集群版本在1.12.6及以上时支持以下两种策略:
|
labels | Array of tag |
节点标签,为Kubernetes集群节点添加标签。标签定义规则:
|
|
runtime | String | docker |
容器运行时名称。 |
runtime_version | String | 19.03.5 |
容器运行时版本。 |
taints | Array of taint |
节点污点信息。污点和容忍度(Toleration)相互配合,可以用来避免Pod被分配到不合适的节点上。更多信息,请参见taint-and-toleration。 |
|
user_data | String | IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFDSyEi |
节点池自定义数据。更多详情,请参见生成实例自定义数据。 |
nodepool_info | object |
节点池配置。 |
|
created | String | 2020-09-27T19:14:09.156823496+08:00 |
节点池创建时间。 |
is_default | Boolean | true |
是否为默认节点池,通常一个集群仅有一个默认节点池。取值:
|
name | String | default-nodepool |
节点池名称。 命名规则:由数字、汉字、英文字符或短划线(-)组成,长度范围1~63个字符,且不能以短划线(-)开头。 |
nodepool_id | String | np615c0e0966124216a0412e10afe0**** |
节点池ID。 |
region_id | String | cn-beijing |
地域ID。 |
resource_group_id | String | rg-acfmyvw3wjmb**** |
资源组ID。 |
type | String | ess |
节点池类型。 |
updated | String | 2020-09-27T20:37:46+08:00 |
节点池更新时间。 |
scaling_group | object |
扩容组配置。 |
|
auto_renew | Boolean | false |
节点是否开启自动续费,当
|
auto_renew_period | Long | 1 |
节点自动续费周期。当 当 |
data_disks | Array of data_disk |
节点数据盘类型、大小等配置的组合。 |
|
image_id | String | aliyun_2_1903_x64_20G_alibase_20200529.vhd |
自定义镜像ID,可通过 |
instance_charge_type | String | PostPaid |
节点池节点付费类型,取值:
|
instance_types | Array of String | ecs.n4.large |
节点实例规格。 |
multi_az_policy | String | BALANCE |
多可用区伸缩组ECS实例扩缩容策略。取值:
默认值: |
on_demand_base_capacity | Long | 0 |
伸缩组所需要按量实例个数的最小值,取值范围:[0,1000]。当按量实例个数少于该值时,将优先创建按量实例。 |
on_demand_percentage_above_base_capacity | Long | 20 |
伸缩组满足最小按量实例数( |
spot_instance_pools | Long | 5 |
指定可用实例规格的个数,伸缩组将按成本最低的多个规格均衡创建抢占式实例。取值范围:[1,10]。 |
spot_instance_remedy | Boolean | false |
是否开启补齐抢占式实例。开启后,当收到抢占式实例将被回收的系统消息时,伸缩组将尝试创建新的实例,替换掉将被回收的抢占式实例。取值:
|
compensate_with_on_demand | Boolean | true |
当
|
period | Long | 0 |
节点包年包月时长,当 当 |
period_unit | String | Month |
节点付费周期,当
|
platform | String | AliyunLinux |
操作系统发行版。取值:
|
ram_policy | String | KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e**** |
Worker RAM 角色名称,授权ECS实例为集群Woker节点。 |
spot_strategy | String | NoSpot |
抢占式实例类型,取值:
更多信息,请参见抢占式实例。 |
spot_price_limit | Array |
抢占实例市场价格区间配置。 |
|
instance_type | String | ecs.c6.large |
抢占式实例规格。 |
price_limit | String | 0.39 |
单台实例市场价格。单位:元/时。 |
rds_instances | Array of String | rm-xxx |
RDS实例。 |
scaling_group_id | String | asg-2zeieod8giqmov7z**** |
伸缩组ID。 |
scaling_policy | String | release |
伸缩组模式,取值:
|
security_group_id | String | sg-2ze60ockeekspl3d**** |
安全组ID。 |
system_disk_category | String | cloud_efficiency |
节点系统盘类型,取值:
|
system_disk_size | Long | 120 |
节点系统盘大小,单位为GiB。 取值范围:[20,500]。 |
tags | Array of tag |
仅为ECS实例添加标签。 标签键不可以重复,最大长度为128个字符;标签键和标签值都不能以“aliyun”、“acs:”开头,或包含“https://”、“http://”。 |
|
vswitch_ids | Array of String | vsw-2ze3ds0mdip0hdz8i**** |
虚拟交换机ID。 |
login_password | String | ******** |
SSH登录密码,和 出于安全性考虑,密码查询结果经过加密处理。 |
key_pair | String | pro-nodepool |
密钥对名称,和 |
status | object |
节点池状态配置。 |
|
failed_nodes | Long | 0 |
失败节点数。 |
healthy_nodes | Long | 3 |
健康节点数。 |
initial_nodes | Long | 0 |
正在创建节点数。 |
offline_nodes | Long | 0 |
离线节点数。 |
removing_nodes | Long | 0 |
正在被移除节点数。 |
serving_nodes | Long | 3 |
工作中节点数。 |
state | String | active |
节点池状态,取值:
|
total_nodes | Long | 3 |
节点池内总节点数。 |
tee_config | object |
加密计算节集群配置。 |
|
tee_enable | Boolean | false |
是否开启加密计算集群,取值:
|
management | object |
托管节点池配置。 |
|
enable | Boolean | true |
是否开启托管版节点池,取值:
|
auto_repair | Boolean | true |
自动修复,仅当
|
upgrade_config | object |
自动升级配置,仅当 |
|
auto_upgrade | Boolean | true |
是否启用自动升级,取值:
|
surge | Long | 5 |
额外节点数量。 |
surge_percentage | Long | 50 |
额外节点比例,和 |
max_unavailable | Long | 1 |
最大不可用节点数量,取值范围:[1,1000] 默认值:1。 |
查询节点池详情示例
请求示例
GET /clusters/c23421cfa74454bc8b37163fd19af****/nodepools/np31da1b38983f4511b490fc62108a**** HTTP/1.1
Content-Type:application/json
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<auto_scaling>
<eip_bandwidth>5</eip_bandwidth>
<eip_internet_charge_type>PayByBandwidth</eip_internet_charge_type>
<enable>true</enable>
<is_bond_eip>true</is_bond_eip>
<max_instances>10</max_instances>
<min_instances>1</min_instances>
<type>cpu</type>
</auto_scaling>
<kubernetes_config>
<cms_enabled>true</cms_enabled>
<cpu_policy>none</cpu_policy>
<labels>
<key>env</key>
<value>prod</value>
</labels>
<runtime>docker</runtime>
<runtime_version>19.03.5</runtime_version>
<taints>
<key>key</key>
<value>value</value>
<effect>NoSchedule</effect>
</taints>
<user_data>IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFDSyEi</user_data>
</kubernetes_config>
<nodepool_info>
<created>2020-09-27T19:14:09.156823496+08:00</created>
<is_default>true</is_default>
<name>default-nodepool</name>
<nodepool_id>np615c0e0966124216a0412e10afe0****</nodepool_id>
<region_id>cn-beijing</region_id>
<resource_group_id>rg-acfmyvw3wjmb****</resource_group_id>
<type>ess</type>
<updated>2020-09-27T20:37:46+08:00</updated>
</nodepool_info>
<scaling_group>
<auto_renew>false</auto_renew>
<auto_renew_period>1</auto_renew_period>
<data_disks>
<category>cloud_ssd</category>
<size>40</size>
<encrypted>true</encrypted>
<auto_snapshot_policy_id>sp-2zej1nogjvovnz4z****</auto_snapshot_policy_id>
</data_disks>
<image_id>aliyun_2_1903_x64_20G_alibase_20200529.vhd</image_id>
<instance_charge_type>PostPaid</instance_charge_type>
<instance_types>ecs.n4.large</instance_types>
<multi_az_policy>BALANCE</multi_az_policy>
<on_demand_base_capacity>0</on_demand_base_capacity>
<on_demand_percentage_above_base_capacity>20</on_demand_percentage_above_base_capacity>
<spot_instance_pools>5</spot_instance_pools>
<spot_instance_remedy>false</spot_instance_remedy>
<compensate_with_on_demand>true</compensate_with_on_demand>
<period>0</period>
<period_unit>Month</period_unit>
<platform>AliyunLinux</platform>
<ram_policy>KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e****</ram_policy>
<spot_strategy>NoSpot</spot_strategy>
<spot_price_limit>
<instance_type>ecs.c6.large</instance_type>
<price_limit>0.39</price_limit>
</spot_price_limit>
<rds_instances>rm-xxx</rds_instances>
<scaling_group_id>asg-2zeieod8giqmov7z****</scaling_group_id>
<scaling_policy>release</scaling_policy>
<security_group_id>sg-2ze60ockeekspl3d****</security_group_id>
<system_disk_category>cloud_efficiency</system_disk_category>
<system_disk_size>120</system_disk_size>
<tags>
<key>env</key>
<value>prod</value>
</tags>
<vswitch_ids>vsw-2ze3ds0mdip0hdz8i****</vswitch_ids>
<login_password>********</login_password>
<key_pair>pro-nodepool</key_pair>
</scaling_group>
<status>
<failed_nodes>0</failed_nodes>
<healthy_nodes>3</healthy_nodes>
<initial_nodes>0</initial_nodes>
<offline_nodes>0</offline_nodes>
<removing_nodes>0</removing_nodes>
<serving_nodes>3</serving_nodes>
<state>active</state>
<total_nodes>3</total_nodes>
</status>
<tee_config>
<tee_enable>false</tee_enable>
</tee_config>
<management>
<enable>true</enable>
<auto_repair>true</auto_repair>
<upgrade_config>
<auto_upgrade>true</auto_upgrade>
<surge>5</surge>
<surge_percentage>50</surge_percentage>
<max_unavailable>1</max_unavailable>
</upgrade_config>
</management>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"auto_scaling" : {
"eip_bandwidth" : 5,
"eip_internet_charge_type" : "PayByBandwidth",
"enable" : true,
"is_bond_eip" : true,
"max_instances" : 10,
"min_instances" : 1,
"type" : "cpu"
},
"kubernetes_config" : {
"cms_enabled" : true,
"cpu_policy" : "none",
"labels" : [ {
"key" : "env",
"value" : "prod"
} ],
"runtime" : "docker",
"runtime_version" : "19.03.5",
"taints" : [ {
"key" : "key",
"value" : "value",
"effect" : "NoSchedule"
} ],
"user_data" : "IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFDSyEi"
},
"nodepool_info" : {
"created" : "2020-09-27T19:14:09.156823496+08:00",
"is_default" : true,
"name" : "default-nodepool",
"nodepool_id" : "np615c0e0966124216a0412e10afe0****",
"region_id" : "cn-beijing",
"resource_group_id" : "rg-acfmyvw3wjmb****",
"type" : "ess",
"updated" : "2020-09-27T20:37:46+08:00"
},
"scaling_group" : {
"auto_renew" : false,
"auto_renew_period" : 1,
"data_disks" : [ {
"category" : "cloud_ssd",
"size" : 40,
"encrypted" : "true",
"auto_snapshot_policy_id" : "sp-2zej1nogjvovnz4z****"
} ],
"image_id" : "aliyun_2_1903_x64_20G_alibase_20200529.vhd",
"instance_charge_type" : "PostPaid",
"instance_types" : [ "ecs.n4.large" ],
"multi_az_policy" : "BALANCE",
"on_demand_base_capacity" : 0,
"on_demand_percentage_above_base_capacity" : 20,
"spot_instance_pools" : 5,
"spot_instance_remedy" : false,
"compensate_with_on_demand" : true,
"period" : 0,
"period_unit" : "Month",
"platform" : "AliyunLinux",
"ram_policy" : "KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e****",
"spot_strategy" : "NoSpot",
"spot_price_limit" : [ {
"instance_type" : "ecs.c6.large",
"price_limit" : "0.39"
} ],
"rds_instances" : [ "rm-xxx" ],
"scaling_group_id" : "asg-2zeieod8giqmov7z****",
"scaling_policy" : "release",
"security_group_id" : "sg-2ze60ockeekspl3d****",
"system_disk_category" : "cloud_efficiency",
"system_disk_size" : 120,
"tags" : [ {
"key" : "env",
"value" : "prod"
} ],
"vswitch_ids" : [ "vsw-2ze3ds0mdip0hdz8i****" ],
"login_password" : "********",
"key_pair" : "pro-nodepool"
},
"status" : {
"failed_nodes" : 0,
"healthy_nodes" : 3,
"initial_nodes" : 0,
"offline_nodes" : 0,
"removing_nodes" : 0,
"serving_nodes" : 3,
"state" : "active",
"total_nodes" : 3
},
"tee_config" : {
"tee_enable" : false
},
"management" : {
"enable" : true,
"auto_repair" : true,
"upgrade_config" : {
"auto_upgrade" : true,
"surge" : 5,
"surge_percentage" : 50,
"max_unavailable" : 1
}
}
}
错误码
访问错误中心查看更多错误码。
开发者资源
-
SDK
阿里云为您提供多种语言的SDK,帮助您快速通过API集成阿里云的产品和服务,推荐您使用SDK调用API,已免除您手动签名验证,详情请参见SDK参考文档链接。
-
OpenAPI Explorer
快速检索,可视化调试API,在线命令行工具,同步动态生成可执行的SDK代码示例。
-
阿里云CLI
阿里云资产管理和配置工具,可通过命令方式同时管理多个阿里云产品和服务,简单快捷,是您上云好帮手。
在文档使用中是否遇到以下问题
更多建议
匿名提交