调用DescribeAddons查询集群安装的组件详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求语法

GET /clusters/components/metadata?region=String&cluster_type=String HTTP/1.1 
Content-Type:application/json

请求参数

表 1. 请求Query参数
参数名称 类型 是否必选 示例 说明
region String cn-beijing

集群所在地域ID。

cluster_type String kubernetes

集群类型,取值:

  • Kubernetes: 专有版集群。
  • ManagedKubernetes:托管版集群。
  • Ask:ASK集群。
  • ExternalKubernetes:注册集群。

响应体语法

HTTP/1.1 200
Content-Type:application/json
{
  "ComponentGroups" : [ {
    "group_name" : "String",
    "items" : [ {
      "name" : "String"
    } ]
  } ],
  "StandardComponents" : {
    "key" : {
      "name" : "String",
      "version" : "String",
      "description" : "String",
      "required" : "String",
      "disabled" : Boolean
    }
  }
}

响应参数

表 2. 响应Body参数
参数名称 类型 示例 说明
ComponentGroups Array of ComponentGroup

组件分组列表。

group_name String storage

组件分组名称。

items Array of item

该分组内包含的组件名称。

name String flexvolume

组件名称。

StandardComponents Map

标准组件。

Object

标准组件的详细信息。

name String ack-arena

组件名称。

version String 0.5.0

组件版本。

description String ***

组件功能说明。

required String false

是否为集群必需组件。取值:

  • true:必需组件,集群创建时必须要安装的组件。
  • false:非必需组件,集群创建完成后,可通过组件管理进行安装。
disabled Boolean false

是否禁止默认安装,集群创建时除了安装集群所需的组件外,还会额外安装一些与日志或者路由相关的组件(例如:Ingress),如果您不想默认安装,可通过设置该字段禁止默认安装。取值:

  • true:禁止默认安装。
  • false:默认安装。

查询集群组件详情示例

请求示例

GET /clusters/components/metadata?region=cn-beijing	&cluster_type=kubernetes HTTP/1.1 
Content-Type:application/json

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<StandardComponents>
    <cloud-controller-manager>
        <name>cloud-controller-manager</name>
        <version>v1.9.3.339-g9830b58-aliyun</version>
        <disabled>false</disabled>
        <required>true</required>
        <description>name: Cloud Controller Manager introduction: Using Cloud Controller Manager to create load balancers for k8s applications and manage node route entries doc:en: https://www.alibabacloud.com/help/doc-detail/94925.htm</description>
    </cloud-controller-manager>
    <csi-plugin>
        <name>csi-plugin</name>
        <version>v1.16.9.43-f36bb540-aliyun</version>
        <disabled>false</disabled>
        <required>false</required>
        <description>csi-plugin</description>
    </csi-plugin>
</StandardComponents>
<ComponentGroups>
    <group_name>storage</group_name>
    <items>
        <name>flexvolume</name>
    </items>
    <items>
        <name>alicloud-disk-controller</name>
    </items>
    <items>
        <name>csi-plugin</name>
    </items>
    <items>
        <name>csi-provisioner</name>
    </items>
</ComponentGroups>
<ComponentGroups>
    <group_name>network</group_name>
    <items>
        <name>kube-flannel-ds</name>
    </items>
    <items>
        <name>terway</name>
    </items>
    <items>
        <name>terway-eni</name>
    </items>
    <items>
        <name>terway-eniip</name>
    </items>
    <items>
        <name>nginx-ingress-controller</name>
    </items>
    <items>
        <name>coredns</name>
    </items>
    <items>
        <name>managed-kube-proxy</name>
    </items>
</ComponentGroups>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "StandardComponents" : {
    "cloud-controller-manager" : {
      "name" : "cloud-controller-manager",
      "version" : "v1.9.3.339-g9830b58-aliyun",
      "disabled" : false,
      "required" : "true",
      "description" : "name: Cloud Controller Manager introduction: Using Cloud Controller Manager to create load balancers for k8s applications and manage node route entries doc:en: https://www.alibabacloud.com/help/doc-detail/94925.htm"
    },
    "csi-plugin" : {
      "name" : "csi-plugin",
      "version" : "v1.16.9.43-f36bb540-aliyun",
      "disabled" : false,
      "required" : "false",
      "description" : "csi-plugin"
    }
  },
  "ComponentGroups" : [ {
    "group_name" : "storage",
    "items" : [ {
      "name" : "flexvolume"
    }, {
      "name" : "alicloud-disk-controller"
    }, {
      "name" : "csi-plugin"
    }, {
      "name" : "csi-provisioner"
    } ]
  }, {
    "group_name" : "network",
    "items" : [ {
      "name" : "kube-flannel-ds"
    }, {
      "name" : "terway"
    }, {
      "name" : "terway-eni"
    }, {
      "name" : "terway-eniip"
    }, {
      "name" : "nginx-ingress-controller"
    }, {
      "name" : "coredns"
    }, {
      "name" : "managed-kube-proxy"
    } ]
  } ]
}

错误码

访问错误中心查看更多错误码。

开发者资源

  • SDK

    阿里云为您提供多种语言的SDK,帮助您快速通过API集成阿里云的产品和服务,推荐您使用SDK调用API,已免除您手动签名验证。

  • OpenAPI Explorer

    快速检索,可视化调试API,在线命令行工具,同步动态生成可执行的SDK代码示例。

  • 阿里云CLI

    阿里云资产管理和配置工具,可通过命令方式同时管理多个阿里云产品和服务,简单快捷,是您上云好帮手。