文档

DATASOURCE::CS::KubernetesClusters

更新时间:

DATASOURCE::CS::KubernetesClusters类型用于查询Kubernetes集群。

语法

{
  "Type": "DATASOURCE::CS::KubernetesClusters",
  "Properties": {
    "ClusterSpec": String,
    "ClusterType": String,
    "Profile": String,
    "Name": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterSpec

String

集群规格。

当集群类型选择ManagedKubernetes时,通过集群规格区分集群的类型。取值:

  • ack.pro.small:专业托管集群,即ACK Pro版集群。

  • ack.standard:标准托管集群。

  • 空值(默认值)。

说明

当取值为空时,不通过该参数区分。

ClusterType

String

集群类型。

取值:

  • Kubernetes: 专有版集群。

  • ManagedKubernetes:

    • 托管版集群。

    • Serverless集群。

    • 边缘集群。

  • Ask:Serverless集群。

  • ExternalKubernetes:注册集群。

说明

查询Serverless集群时,集群类型参数的取值,取决于创建Serverless集群时指定的值。

Profile

String

集群标识。

当集群类型选择ManagedKubernetes时,通过集群标识区分集群类型。取值:

  • Default:托管版集群。

  • Serverless:Serverless集群。

  • Edge:边缘集群。

  • 空值(默认值)。

说明

当取值为空时,不通过该参数区分。

Name

String

集群名称。

命名规则:由数字、汉字、英文字符或短划线(-)组成。长度范围为1~63个字符,且不能以短划线(-)开头。

返回数据(Fn::GetAtt)

  • ClusterIds:集群ID列表。

  • Clusters:集群详情列表。

属性名称

类型

描述

约束

ClusterIds

List

集群ID列表 。

Clusters

List

集群详情列表。

Name

String

集群名称。

命名规则:由数字、汉字、英文字符或短划线(-)组成,长度范围为1~63个字符,且不能以短划线(-)开头。

ClusterId

String

集群ID。

RegionId

String

集群所在地域ID。

State

String

集群运行状态。

取值:

  • initial:集群创建中。

  • failed:集群创建失败。

  • running:集群运行中。

  • updating:集群升级中。

  • updating_failed:集群升级失败。

  • scaling:集群伸缩中。

  • stopped:集群停止运行。

  • deleting:集群删除中。

  • deleted:集群被删除。

  • delete_failed:集群删除失败。

ClusterType

String

集群类型。

取值:

  • Kubernetes: 专有版集群。

  • ManagedKubernetes:托管版集群。

  • Ask:Serverless集群。

  • ExternalKubernetes:注册集群。

Created

String

集群创建时间。

Updated

String

集群更新时间。

InitVersion

String

初始集群版本。

目前ACK控制台提供两种最新Kubernetes版本的集群。您可以通过API创建其他Kubernetes版本集群。ACK支持的Kubernetes版本,请参见Kubernetes版本发布概览

说明

集群版本应与Kubernetes社区基线版本保持一致。建议选择最新版本,若不指定,默认使用最新版本。

CurrentVersion

String

集群当前版本。

MetaData

String

集群元数据信息。

ResourceGroupId

String

集群资源组ID。

InstanceType

String

集群实例规格。

VpcId

String

集群专有网络ID。

VSwitchId

String

集群交换机ID。

VSwitchCidr

String

集群交换机CIDR。

DataDiskSize

String

集群数据盘大小。

DataDiskCategory

String

集群数据盘类型。

SecurityGroupId

String

集群安全组ID。

Tags

List

集群资源标签。

关于标签示例,请参见tag

ZoneId

String

集群所在可用区ID。

NetworkMode

String

集群网络模式。

取值:

  • classic:经典网络。

  • vpc(默认值):专有网络。

  • overlay:叠加网络。

  • calico:Calico网络。

SubnetCidr

String

Pod网络地址段。

必须是有效的私有网段,即以下网段及其子网:

  • 10.0.0.0/8

  • 172.16-31.0.0/12-16

  • 192.168.0.0/16

说明

不能与VPC及VPC内已有Kubernetes集群使用的网段重复,且创建成功后不能被修改。

MasterUrl

String

集群访问地址。

取值:

  • 内网访问地址。

  • 公网访问地址。

ExternalLoadbalancerId

String

集群Ingress SLB实例ID。

Port

String

节点端口。

NodeStatus

String

节点是否就绪。

取值:

  • Ready:节点已就绪。

  • NotReady:节点未就绪。

  • Unknown:未知。

  • Offline:离线中。

ClusterHealthy

String

集群健康状况。

DockerVersion

String

集群中的Docker版本。

SwarmMode

Boolean

是否开启Swarm Mode。

取值:

  • true:开启。

  • false:不开启。

GwBridge

String

GW网桥。

UpgradeComponents

Map

集群可升级组件。

示例:{ "Kubernetes": { "ComponentName": "Kubernetes", "Version": "1.14.8-aliyun.1", "NextVersion": "", "Changed": "", "CanUpgrade": false, "Force": false, "Policy": "", "ExtraVars": null, "ReadyToUpgrade": "", "Message": "", "Exist": false, "Required": false }}

NextVersion

String

集群可升级版本。

PrivateZone

Boolean

集群Private Zone配置。

取值:

  • true:启用Private Zone。

  • false:不启用Private Zone。

ServiceDiscoveryTypes

List

集群内服务发现类型。

用于在ACK Serverless集群中指定服务发现方式。

集群内服务发现方式默认为空。

取值:

  • CoreDNS:使用Kubernetes原生标准服务发现组件CoreDNS,需要在集群部署一组容器用于DNS解析。

    说明

    默认采用两个0.25 Core 512 MiB规格的ECI实例。

  • PrivateZone:使用阿里云PrivateZone产品提供服务发现能力,需要开启PrivateZone服务。

PrivateLink

String

集群绑定私网连接。

Profile

String

面向场景时的集群类型。

取值:

  • Default:非边缘场景集群。

  • Edge:边缘场景集群。

DeletionProtection

Boolean

集群删除保护。

防止通过控制台或API误删除集群。取值:

  • true:启用集群删除保护,将不能通过控制台或API删除集群。

  • false:不启用集群删除保护,可以通过控制台或API删除集群。

ClusterSpec

String

托管版集群类型。

面向托管集群。取值:

  • ack.pro.small:专业托管集群。

  • ack.standard :标准托管集群。

MaintenanceWindow

Map

集群维护窗口配置。

只在专业托管版本(即:ACK Pro版集群)中生效,请参见maintenance_window

Capabilities

Map

Kubernetes版本功能特性。

EnabledMigration

Boolean

集群是否开启过迁移。

取值:

  • true:开启。

  • false:不开启。

NeedUpdateAgent

Boolean

是否支持升级Agent。

取值:

  • true:支持。

  • false:不支持。

Outputs

List

集群输出信息。

示例:[ { "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-2zebrr08gt5uluh7****" }, { "Description": "Ids of worker node", "OutputKey": "NodeInstanceIDs", "OutputValue": [ "i-2ze4ymrjuocpbc0c****", "i-2ze4ymrjuocpbc0c****", "i-2ze4ymrjuocpbc0c****" ] }, { "Description": "Count of ess scaling instance", "OutputKey": "NodesScalingAddedInstances", "OutputValue": 3 } ]

Parameters

Map

集群参数输入。

WorkerRamRoleName

String

Worker RAM角色名称。

授权ECS实例为集群Woker节点。

MaintenanceInfo

Map

集群维护配置。

示例

  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ClusterSpec": {
          "Type": "String",
          "Description": "The specification of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster specifications to distinguish clusters. Valid values:\nack.pro.small: professional managed Kubernetes cluster\nack.standard: standard managed Kubernetes cluster\nBy default, this parameter is empty. This indicates that the parameter is not used to filter clusters."
        },
        "ClusterType": {
          "Type": "String",
          "Description": "The type of the cluster. Valid values:\nKubernetes: dedicated Kubernetes cluster\nManagedKubernetes: managed Kubernetes cluster, serverless Kubernetes (ASK) cluster, or edge Kubernetes cluster\nAsk: ASK cluster\nExternalKubernetes: registered external cluster\nWhen you query an ASK cluster, the value specified when the cluster was created is returned."
        },
        "Profile": {
          "Type": "String",
          "Description": "The identifier of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster identifiers to distinguish clusters. Valid values:\nDefault: managed Kubernetes cluster\nServerless: ASK cluster\nEdge: edge Kubernetes cluster\nBy default, this parameter is empty. This indicates that the parameter is not used to filter clusters."
        },
        "Name": {
          "Type": "String",
          "Description": "The name of the cluster.The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-)."
        }
      },
      "Resources": {
        "KubernetesClusters": {
          "Type": "DATASOURCE::CS::KubernetesClusters",
          "Properties": {
            "ClusterSpec": {
              "Ref": "ClusterSpec"
            },
            "ClusterType": {
              "Ref": "ClusterType"
            },
            "Profile": {
              "Ref": "Profile"
            },
            "Name": {
              "Ref": "Name"
            }
          }
        }
      },
      "Outputs": {
        "Clusters": {
          "Description": "The list of clusters.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesClusters",
              "Clusters"
            ]
          }
        },
        "ClusterIds": {
          "Description": "The list of cluster IDs.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesClusters",
              "ClusterIds"
            ]
          }
        }
      }
    }
  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ClusterSpec:
        Type: String
        Description: |-
          The specification of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster specifications to distinguish clusters. Valid values:
          ack.pro.small: professional managed Kubernetes cluster
          ack.standard: standard managed Kubernetes cluster
          By default, this parameter is empty. This indicates that the parameter is not used to filter clusters.
      ClusterType:
        Type: String
        Description: |-
          The type of the cluster. Valid values:
          Kubernetes: dedicated Kubernetes cluster
          ManagedKubernetes: managed Kubernetes cluster, serverless Kubernetes (ASK) cluster, or edge Kubernetes cluster
          Ask: ASK cluster
          ExternalKubernetes: registered external cluster
          When you query an ASK cluster, the value specified when the cluster was created is returned.
      Profile:
        Type: String
        Description: |-
          The identifier of the cluster. If you set the cluster type to ManagedKubernetes, you can use cluster identifiers to distinguish clusters. Valid values:
          Default: managed Kubernetes cluster
          Serverless: ASK cluster
          Edge: edge Kubernetes cluster
          By default, this parameter is empty. This indicates that the parameter is not used to filter clusters.
      Name:
        Type: String
        Description: The name of the cluster.The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).
    Resources:
      KubernetesClusters:
        Type: DATASOURCE::CS::KubernetesClusters
        Properties:
          ClusterSpec:
            Ref: ClusterSpec
          ClusterType:
            Ref: ClusterType
          Profile:
            Ref: Profile
          Name:
            Ref: Name
    Outputs:
      Clusters:
        Description: The list of clusters.
        Value:
          Fn::GetAtt:
            - KubernetesClusters
            - Clusters
      ClusterIds:
        Description: The list of cluster IDs.
        Value:
          Fn::GetAtt:
            - KubernetesClusters
            - ClusterIds
                        
  • 本页导读 (1)
文档反馈