ALIYUN::CS::AnyCluster类型用于创建任意类型的Kubernetes集群实例。

语法

{
  "Type": "ALIYUN::CS::AnyCluster",
  "Properties": {
    "ClusterConfig": Map
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
ClusterConfig Map 集群配置 请参见创建Kubernetes集群的API。例如:创建Managed Kubernetes集群详情,请参见创建Managed Kubernetes集群

返回值

Fn::GetAtt

  • ClusterId:集群ID。
  • TaskId:任务ID。系统自动分配,用于查询任务状态。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "AnyCluster": {
      "Type": "ALIYUN::CS::AnyCluster",
      "Properties": {
        "ClusterConfig": {
          "Ref": "ClusterConfig"
        }
      }
    }
  },
  "Parameters": {
    "ClusterConfig": {
      "Type": "Json",
      "Description": "Cluster config."
    }
  },
  "Outputs": {
    "ClusterId": {
      "Description": "Cluster instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "ClusterId"
        ]
      }
    },
    "TaskId": {
      "Description": "Task ID. Automatically assigned by the system, the user queries the task status.",
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "TaskId"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  AnyCluster:
    Type: 'ALIYUN::CS::AnyCluster'
    Properties:
      ClusterConfig:
        Ref: ClusterConfig
Parameters:
  ClusterConfig:
    Type: Json
    Description: Cluster config.
Outputs:
  ClusterId:
    Description: Cluster instance ID.
    Value:
      'Fn::GetAtt':
        - AnyCluster
        - ClusterId
  TaskId:
    Description: >-
      Task ID. Automatically assigned by the system, the user queries the task
      status.
    Value:
      'Fn::GetAtt':
        - AnyCluster
        - TaskId