文档

DATASOURCE::CS::KubernetesCluster

更新时间:

DATASOURCE::CS::KubernetesCluster类型用于查询Kubernete集群信息。

语法

{
  "Type": "DATASOURCE::CS::KubernetesCluster",
  "Properties": {
    "ClusterId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterId

String

集群ID。

返回值

Fn::GetAtt

  • SubnetCidr:Pod网络地址段。

  • ExternalLoadbalancerId:集群中Ingress SLB实例。

  • ResourceGroupId:集群资源组ID。

  • InitVersion:初始集群版本。

  • Size:集群中的节点数量。

  • CurrentVersion:集群当前版本。

  • MasterUrl:集群访问地址。

  • Profile:集群标识。

  • Name:集群名称。

  • Created:集群创建时间。

  • DockerVersion:集群中的Docker版本。

  • MetaData:集群元数据信息。

  • Tags:集群的标签。

  • PrivateZone:集群Private Zone配置。

  • Parameters:集群参数输入

  • Updated:集群更新时间。

  • ZoneId:集群所在可用区ID。

  • ClusterId:集群ID。

  • VSwitchId:集群交换机ID。

  • SecurityGroupId:集群安全组ID。

  • ClusterSpec:集群规格。

  • NetworkMode:集群网络模式。

  • ClusterType:集群类型。

  • DeletionProtection:集群删除保护。

  • VpcId:集群专有网络ID。

  • State:集群运行状态。

  • NextVersion:集群可升级版本。

  • WorkerRamRoleName:Worker RAM角色名称。

  • RegionId:集群所在地域ID。

  • MaintenanceWindow:集群维护窗口配置。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ClusterId:
        Description:
          en: Cluster instance ID.
        Required: false
        Type: String
    Resources:
      KubernetesCluster:
        Properties:
          ClusterId:
            Ref: ClusterId
        Type: DATASOURCE::CS::KubernetesCluster
    Outputs:
      ClusterId:
        Description: Cluster instance ID.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - ClusterId
      ClusterSpec:
        Description: 'The type of the managed Kubernetes cluster. This parameter is returned
          for a managed Kubernetes cluster. Valid values:
    
          - ack.pro.small: professional managed Kubernetes cluster.
    
          - ack.standard: standard managed Kubernetes cluster.'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - ClusterSpec
      ClusterType:
        Description: 'The type of the cluster. Valid values:
    
          - Kubernetes: dedicated Kubernetes cluster
    
          - ManagedKubernetes: managed Kubernetes cluster
    
          - Ask: ASK cluster
    
          - ExternalKubernetes: registered external Kubernetes cluster'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - ClusterType
      Created:
        Description: The time when the cluster was created.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Created
      CurrentVersion:
        Description: The current Kubernetes version of the cluster. For more information
          about the Kubernetes versions supported by ACK, see Release notes for Kubernetes
          versions.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - CurrentVersion
      DeletionProtection:
        Description: 'Indicates whether deletion protection is enabled. If deletion protection
          is enabled, the cluster cannot be deleted in the ACK console or by calling the
          API. Valid values:
    
          - true: Deletion protection is enabled. You cannot delete the cluster in the
          ACK console or by calling the API.
    
          - false: Deletion protection is not enabled. You can delete the cluster in the
          ACK console or by calling the API.'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - DeletionProtection
      DockerVersion:
        Description: The Docker version that is used by the cluster.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - DockerVersion
      ExternalLoadbalancerId:
        Description: The ID of the Server Load Balancer (SLB) instance that is used for
          the Ingress of the cluster.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - ExternalLoadbalancerId
      InitVersion:
        Description: The Kubernetes version that is initially used by the cluster.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - InitVersion
      MaintenanceWindow:
        Description: The maintenance window of the cluster. This feature is available
          in only professional managed Kubernetes clusters.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - MaintenanceWindow
      MasterUrl:
        Description: The address of the cluster. It includes an internal endpoint and
          a public endpoint.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - MasterUrl
      MetaData:
        Description: The metadata of the cluster.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - MetaData
      Name:
        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
          (-).
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Name
      NetworkMode:
        Description: "The network mode of the cluster. Valid values: \n- classic: the\
          \ classic network \n- vpc: virtual private cloud (VPC) \n- overlay: overlay\
          \ network\n- calico: network powered by Calico\nDefault value: vpc."
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - NetworkMode
      NextVersion:
        Description: The Kubernetes version to which the cluster can be upgraded.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - NextVersion
      Parameters:
        Description: A collection of cluster ROS parameters.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Parameters
      PrivateZone:
        Description: 'Indicates whether Alibaba Cloud DNS PrivateZone is enabled.
    
          - true: indicates that Alibaba Cloud DNS PrivateZone is enabled.- false: indicates
          that Alibaba Cloud DNS PrivateZone is not enabled.'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - PrivateZone
      Profile:
        Description: 'Indicates the scenario in which the cluster is used. Valid values:
    
          - Default: indicates that the cluster is used in non-edge computing scenarios.
    
          - Edge: indicates that the ACK cluster is used in edge computing scenarios.'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Profile
      RegionId:
        Description: The ID of the region where the cluster is deployed.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - RegionId
      ResourceGroupId:
        Description: The ID of the resource group to which the cluster belongs.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - ResourceGroupId
      SecurityGroupId:
        Description: The ID of the security group to which the instances of the cluster
          belong.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - SecurityGroupId
      Size:
        Description: The number of nodes in the cluster. Master nodes and worker nodes
          are included.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Size
      State:
        Description: 'The state of the cluster. Valid values:
    
          - initial: The cluster is being created.
    
          - failed: The cluster failed to be created.
    
          - running: The cluster is running.
    
          - updating: The cluster is being upgraded.
    
          - updating_failed: The cluster failed to be upgraded.
    
          - scaling: The cluster is being scaled.
    
          - waiting: The registered cluster is waiting for connecting.
    
          - disconnected: The registeredcluster is disconnected.
    
          - stopped: The cluster is stopped.
    
          - deleting: The cluster is being deleted.
    
          - deleted: The cluster is deleted.
    
          - delete_failed: The cluster failed to be deleted.'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - State
      SubnetCidr:
        Description: 'The pod CIDR block. It must be a valid and private CIDR block, and
          must be one of the following CIDR blocks or their subnets:
    
          - 10.0.0.0/8
    
          - 172.16-31.0.0/12-16
    
          - 192.168.0.0/16
    
          The pod CIDR block cannot overlap with that of the VPC or those of the ACK clusters
          that are deployed in the VPC. For more information about the network segmentation
          of ACK clusters, see Plan CIDR blocks for ACK clusters in a VPC.'
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - SubnetCidr
      Tags:
        Description: The labels of the cluster.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Tags
      Updated:
        Description: The time when the cluster was updated.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - Updated
      VSwitchId:
        Description: The IDs of the vSwitches. You can select one to three vSwitches when
          you create an ACK cluster. vSwitches in different zones are recommended to ensure
          high availability.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - VSwitchId
      VpcId:
        Description: The ID of the VPC where the cluster is deployed. This parameter is
          required when you create an ACK cluster.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - VpcId
      WorkerRamRoleName:
        Description: "The name of the worker RAM role. \nThe RAM role is assigned to the\
          \ worker nodes of the cluster and allows the worker nodes to manage Elastic\
          \ Compute Service (ECS) instances."
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - WorkerRamRoleName
      ZoneId:
        Description: The ID of the zone where the cluster is deployed.
        Value:
          Fn::GetAtt:
          - KubernetesCluster
          - ZoneId
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ClusterId": {
          "Type": "String",
          "Description": {
            "en": "Cluster instance ID."
          },
          "Required": false
        }
      },
      "Resources": {
        "KubernetesCluster": {
          "Type": "DATASOURCE::CS::KubernetesCluster",
          "Properties": {
            "ClusterId": {
              "Ref": "ClusterId"
            }
          }
        }
      },
      "Outputs": {
        "SubnetCidr": {
          "Description": "The pod CIDR block. It must be a valid and private CIDR block, and must be one of the following CIDR blocks or their subnets:\n- 10.0.0.0/8\n- 172.16-31.0.0/12-16\n- 192.168.0.0/16\nThe pod CIDR block cannot overlap with that of the VPC or those of the ACK clusters that are deployed in the VPC. For more information about the network segmentation of ACK clusters, see Plan CIDR blocks for ACK clusters in a VPC.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "SubnetCidr"
            ]
          }
        },
        "ExternalLoadbalancerId": {
          "Description": "The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "ExternalLoadbalancerId"
            ]
          }
        },
        "ResourceGroupId": {
          "Description": "The ID of the resource group to which the cluster belongs.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "ResourceGroupId"
            ]
          }
        },
        "InitVersion": {
          "Description": "The Kubernetes version that is initially used by the cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "InitVersion"
            ]
          }
        },
        "Size": {
          "Description": "The number of nodes in the cluster. Master nodes and worker nodes are included.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Size"
            ]
          }
        },
        "CurrentVersion": {
          "Description": "The current Kubernetes version of the cluster. For more information about the Kubernetes versions supported by ACK, see Release notes for Kubernetes versions.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "CurrentVersion"
            ]
          }
        },
        "MasterUrl": {
          "Description": "The address of the cluster. It includes an internal endpoint and a public endpoint.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "MasterUrl"
            ]
          }
        },
        "Profile": {
          "Description": "Indicates the scenario in which the cluster is used. Valid values:\n- Default: indicates that the cluster is used in non-edge computing scenarios.\n- Edge: indicates that the ACK cluster is used in edge computing scenarios.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Profile"
            ]
          }
        },
        "Name": {
          "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 (-).",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Name"
            ]
          }
        },
        "Created": {
          "Description": "The time when the cluster was created.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Created"
            ]
          }
        },
        "DockerVersion": {
          "Description": "The Docker version that is used by the cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "DockerVersion"
            ]
          }
        },
        "MetaData": {
          "Description": "The metadata of the cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "MetaData"
            ]
          }
        },
        "Tags": {
          "Description": "The labels of the cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Tags"
            ]
          }
        },
        "PrivateZone": {
          "Description": "Indicates whether Alibaba Cloud DNS PrivateZone is enabled.\n- true: indicates that Alibaba Cloud DNS PrivateZone is enabled.- false: indicates that Alibaba Cloud DNS PrivateZone is not enabled.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "PrivateZone"
            ]
          }
        },
        "Parameters": {
          "Description": "A collection of cluster ROS parameters.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Parameters"
            ]
          }
        },
        "Updated": {
          "Description": "The time when the cluster was updated.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "Updated"
            ]
          }
        },
        "ZoneId": {
          "Description": "The ID of the zone where the cluster is deployed.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "ZoneId"
            ]
          }
        },
        "ClusterId": {
          "Description": "Cluster instance ID.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "ClusterId"
            ]
          }
        },
        "VSwitchId": {
          "Description": "The IDs of the vSwitches. You can select one to three vSwitches when you create an ACK cluster. vSwitches in different zones are recommended to ensure high availability.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "VSwitchId"
            ]
          }
        },
        "SecurityGroupId": {
          "Description": "The ID of the security group to which the instances of the cluster belong.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "SecurityGroupId"
            ]
          }
        },
        "ClusterSpec": {
          "Description": "The type of the managed Kubernetes cluster. This parameter is returned for a managed Kubernetes cluster. Valid values:\n- ack.pro.small: professional managed Kubernetes cluster.\n- ack.standard: standard managed Kubernetes cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "ClusterSpec"
            ]
          }
        },
        "NetworkMode": {
          "Description": "The network mode of the cluster. Valid values: \n- classic: the classic network \n- vpc: virtual private cloud (VPC) \n- overlay: overlay network\n- calico: network powered by Calico\nDefault value: vpc.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "NetworkMode"
            ]
          }
        },
        "ClusterType": {
          "Description": "The type of the cluster. Valid values:\n- Kubernetes: dedicated Kubernetes cluster\n- ManagedKubernetes: managed Kubernetes cluster\n- Ask: ASK cluster\n- ExternalKubernetes: registered external Kubernetes cluster",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "ClusterType"
            ]
          }
        },
        "DeletionProtection": {
          "Description": "Indicates whether deletion protection is enabled. If deletion protection is enabled, the cluster cannot be deleted in the ACK console or by calling the API. Valid values:\n- true: Deletion protection is enabled. You cannot delete the cluster in the ACK console or by calling the API.\n- false: Deletion protection is not enabled. You can delete the cluster in the ACK console or by calling the API.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "DeletionProtection"
            ]
          }
        },
        "VpcId": {
          "Description": "The ID of the VPC where the cluster is deployed. This parameter is required when you create an ACK cluster.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "VpcId"
            ]
          }
        },
        "State": {
          "Description": "The state of the cluster. Valid values:\n- initial: The cluster is being created.\n- failed: The cluster failed to be created.\n- running: The cluster is running.\n- updating: The cluster is being upgraded.\n- updating_failed: The cluster failed to be upgraded.\n- scaling: The cluster is being scaled.\n- waiting: The registered cluster is waiting for connecting.\n- disconnected: The registeredcluster is disconnected.\n- stopped: The cluster is stopped.\n- deleting: The cluster is being deleted.\n- deleted: The cluster is deleted.\n- delete_failed: The cluster failed to be deleted.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "State"
            ]
          }
        },
        "NextVersion": {
          "Description": "The Kubernetes version to which the cluster can be upgraded.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "NextVersion"
            ]
          }
        },
        "WorkerRamRoleName": {
          "Description": "The name of the worker RAM role. \nThe RAM role is assigned to the worker nodes of the cluster and allows the worker nodes to manage Elastic Compute Service (ECS) instances.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "WorkerRamRoleName"
            ]
          }
        },
        "RegionId": {
          "Description": "The ID of the region where the cluster is deployed.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "RegionId"
            ]
          }
        },
        "MaintenanceWindow": {
          "Description": "The maintenance window of the cluster. This feature is available in only professional managed Kubernetes clusters.",
          "Value": {
            "Fn::GetAtt": [
              "KubernetesCluster",
              "MaintenanceWindow"
            ]
          }
        }
      }
    }
                            
  • 本页导读 (1)
文档反馈