开发者社区> 问答> 正文

如何查询集群实例?

如何查询集群实例?

展开
收起
小天使爱美 2020-03-31 21:06:57 1005 0
1 条回答
写回答
取消 提交回答
  • 调用 DescribeClusterDetail 根据集群 ID,查看集群的详细信息。

    请求信息 请求行 RequestLine

    GET /clusters/{cluster_id} HTTP/1.1 请求行参数 URI Param

    名称 类型 是否必须 描述 cluster_id string 是 集群 ID。 特有请求头 RequestHead

    无,请参考公共请求头部。

    请求体 RequestBody

    返回信息 返回行 ResponseLine

    HTTP/1.1 200 OK 特有返回头 ResponseHead

    无,请参考公共返回头部。

    返回体 ResponseBody

    { "name": "sian-devk8s", "cluster_id": "cdde1f21ae22e483ebcb068a6eb7f358d", "size": 1, "region_id": "cn-beijing", "state": "running", "cluster_type": "ManagedKubernetes", "created": "2019-11-25T15:50:20+08:00", "updated": "2020-01-13T23:01:03+08:00", "init_version": "1.14.8-aliyun.1", "current_version": "1.14.8-aliyun.1", "meta_data": "{"Addons":[{"name":"flannel","version":"","disabled":false,"required":"","config":""},{"name":"flexvolume","version":"","disabled":false,"required":"","config":""},{"name":"alicloud-disk-controller","version":"","disabled":false,"required":"","config":""},{"name":"logtail-ds","version":"","disabled":false,"required":"","config":"{\"IngressDashboardEnabled\":\"true\"}"},{"name":"nginx-ingress-controller","version":"","disabled":false,"required":"","config":"{\"IngressSlbNetworkType\":\"internet\"}"},{"name":"kube-flannel-ds","version":"","disabled":false,"required":"","config":""}],"Capabilities":{"AnyAZ":true,"CSI":true,"CpuPolicy":true,"DeploymentSet":true,"HpcCluster":true,"Network":"Flannel","NodeCIDRMask":"25","NodeNameMode":true,"ProxyMode":"ipvs","PublicSLB":true,"SLSProjectName":true,"SandboxRuntime":false,"Taint":true,"TerwayEniip":true,"UserData":true},"ClusterDomain":"","DockerVersion":"18.09.2","EtcdVersion":"v3.3.8","HasSandboxRuntime":false,"KubernetesVersion":"1.14.8-aliyun.1","MultiAZ":false,"NameMode":"","OSType":"Linux","Platform":"CentOS","PodVswitchId":"","Provider":"","ResourceGroupId":"rg-acfmyvw3wjmb3uq","SubClass":"default","SupportPlatforms":null,"VersionSpec":null,"VpcCidr":"192.168.0.0/16"}", "resource_group_id": "rg-acfmyvw3wjmb3uq", "instance_type": "", "vpc_id": "vpc-2zecuu62b9zw7a7qnn2tv", "vswitch_id": "vsw-2zete8s4qocqg0mf6xd76", "vswitch_cidr": "", "data_disk_size": 0, "data_disk_category": "cloud", "security_group_id": "sg-2zedf74ifulatvx0z2ag", "tags": [ { "key": "ack.aliyun.com", "value": "cdde1f21ae22e483ebcb068a6eb7f358d" } ], "zone_id": "cn-beijing-a", "-": "PayByTraffic", "network_mode": "vpc", "subnet_cidr": "172.20.0.0/16", "master_url": "{"api_server_endpoint":"https://47.93.195.255:6443https://mirana.cs-cn-beijing.aliyuncs.com:4243https://192.168.0.79:6443"}", "external_loadbalancer_id": "lb-2ze3buguz3gx9920zwf24", "port": 0, "node_status": "", "cluster_healthy": "", "docker_version": "18.09.2", "swarm_mode": false, "gw_bridge": "", "upgrade_components": { "Kubernetes": { "component_name": "Kubernetes", "version": "1.14.8-aliyun.1", "next_version": "", "changed": "", "can_upgrade": false, "force": false, "policy": "", "ExtraVars": null, "ready_to_upgrade": "", "message": "", "exist": false, "required": false } }, "private_zone": false, "profile": "", "deletion_protection": true, "capabilities": null, "enabled_migration": false, "need_update_agent": false, "outputs": [ { "Description": "Log Info Output", "OutputKey": "LastKnownError", "OutputValue": null }, { "Description": "Error msg of ess scaling instance", "OutputKey": "NodesScalingErrorInfo", "OutputValue": null }, { "Description": "The mode we use in kube-proxy.", "OutputKey": "ProxyMode", "OutputValue": "ipvs" }, { "Description": "ScalingGroup ID", "OutputKey": "ScalingGroupID", "OutputValue": "asg-2zebrr08gt5uluh7u5ar" }, { "Description": "Ids of worker node", "OutputKey": "NodeInstanceIDs", "OutputValue": [ "i-2ze4ymrjuocpbc0cftdj", "i-2ze4ymrjuocpbc0cftdk", "i-2ze4ymrjuocpbc0cftdl" ] }, { "Description": "Count of ess scaling instance", "OutputKey": "NodesScalingAddedInstances", "OutputValue": 3 } ] 返回体解释

    Cluster 的格式

    名称 类型 描述 agent_version string Agent 版本号。 cluster_id String 集群 ID,集群的唯一标识。 created string 集群的创建时间。 external_loadbalancer_id String 集群负载均衡服务的 ID。 master_url string 集群 Master 地址,您可以通过该地址连接您的集群进行相关操作。更多详细信息,参见SSH 访问 Kubernetes 集群。 name string 集群名称,由您在创建集群时指定,在每个用户下唯一。 network_mode String 集群网络模式(VPC 网络: vpc)。 region_id String 集群所在地域 ID。 security_group_id String 安全组 ID。 size String 节点数。 state String 集群状态,running|stoped。 updated string 最后更新时间。 vpc_id string VPC ID。 vswitch_id string VSwitch ID。 示例 请求示例

    GET /clusters/C5b5e80b0b64a4bf6939d2d8fbbc5**** HTTP/1.1 <公共请求头> 返回示例

    HTTP/1.1 200 Ok <公共响应头> { "agent_version": "0.5-e56dab3", "cluster_id": "c978ca3eaacd3409a9437db07598f****", "created": "2015-12-11T03:52:40Z", "external_loadbalancer_id": "1518f2b7e4c-cn-beijing-btc-a01", "master_url": "https://182.***.***.***:17589", "name": "my-python-cluster-039de960", "network_mode": "vpc", "region_id": "cn-beijing", "security_group_id": "sg-25yqj***", "size": 5, "state": "running", "updated": "2015-12-15T15:01:58Z", "vpc_id": "", "vswitch_id": "" }

    2020-03-31 21:07:14
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
PostgreSQL复制原理及高可用集群 立即下载
PolarDB for PostgreSQL三节点功能介绍 立即下载
MaxCompute Logview参数详解和问题排查(废弃) 立即下载