ALIYUN::CS::ServerlessKubernetesCluster is used to create a Serverless Kubernetes cluster instance.

Syntax

{
  "Type": "ALIYUN::CS::ServerlessKubernetesCluster",
  "Properties": {
    "VpcId": String,
    "Name": String,
    "Tags": List,
    "ZoneId": String,
    "PrivateZone": Boolean,
    "VSwitchId": String,
    "NatGateway": Boolean
  }
}

Properties

Parameter Type Required Editable Description Constraint
VpcId String No Released The ID of the VPC. If this parameter is not specified, the system automatically creates a VPC. The CIDR block of the VPC is 192.168.0.0/16. The values of VpcId and VSwitchId must be both specified or specified at the same time.
Name String Yes Not supported Cluster Name It must start with a digit or English letter and can contain uppercase letters, lowercase letters, Chinese character, numbers, and dashes (-).
Tags List Erased Released Cluster tags None
ZoneId String No Released Zone None
PrivateZone Boolean Erased Released Specifies whether to enable PrivateZone for service discovery. Valid values:
  • true
  • false (default)
For more information, see Serverless clusters support the service discovery based on Alibaba Cloud DNS PrivateZone.
VSwitchId String No Released The ID of the VSwitch. If this parameter is not specified, the system automatically creates a vSwitch with CIDR block 192.168.0.0/16. The values of VpcId and VSwitchId must be both specified or specified at the same time.
NatGateway Boolean Erased Released Create NAT Gateway Valid values:
  • true
  • false (default)

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]

Tags properties

Parameter Type Required Editable Description Constraint
Key String Yes Not supported The tag key. It must be 1 to 64 characters in length, and cannot start with aliyun, acs:, https:// or http:// the beginning.
Value String No Released The value of the new tag. It must be 0 to 128 characters in length and cannot start with aliyun, acs:, https:// or http:// the beginning.

Return value

Fn::GetAtt

  • ClusterId: The ID of the cluster.
  • TaskId: The ID of the task. It is automatically allocated by the system to query the task status.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ServerlessKubernetesCluster": {
      "Type": "ALIYUN::CS::ServerlessKubernetesCluster",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "Name": {
          "Ref": "Name"
        },
        "Tags": {
          "Ref": "Tags"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "PrivateZone": {
          "Ref": "PrivateZone"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "NatGateway": {
          "Ref": "NatGateway"
        }
      }
    }
  },
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "VPC ID. If not set, the system will automatically create a VPC, and the VPC network segment created by the system is 192.168.0.0/16. \nVpcId and VSwitchId can only be empty at the same time or set the corresponding values at the same time."
    },
    "Name": {
      "Type": "String",
      "Description": "The name of the cluster. The cluster name can use uppercase and lowercase letters, Chinese characters, numbers, and dashes."
    },
    "Tags": {
      "Type": "Json",
      "Description": "Tag the cluster."
    },
    "ZoneId": {
      "Type": "String",
      "Description": "The zone ID."
    },
    "PrivateZone": {
      "Type": "Boolean",
      "Description": "Whether to enable PrivateZone for service discovery.",
      "AllowedValues": [
        true,
        false
      ]
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "If not set, the system will automatically create a switch, and the network segment of the switch created by the system is 192.168.0.0/18."
    },
    "NatGateway": {
      "Default": false,
      "Type": "Boolean",
      "Description": "Whether to create a NAT gateway. The value can be true or false. If not set, the system defaults to false.",
      "AllowedValues": [
        true,
        false
      ]
    }
  },
  "Outputs": {
    "ClusterId": {
      "Description": "Cluster instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "ServerlessKubernetesCluster",
          "ClusterId"
        ]
      }
    },
    "TaskId": {
      "Description": "Task ID. Automatically assigned by the system, the user queries the task status.",
      "Value": {
        "Fn::GetAtt": [
          "ServerlessKubernetesCluster",
          "TaskId"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  ServerlessKubernetesCluster:
    Type: 'ALIYUN::CS::ServerlessKubernetesCluster'
    Properties:
      VpcId:
        Ref: VpcId
      Name:
        Ref: Name
      Tags:
        Ref: Tags
      ZoneId:
        Ref: ZoneId
      PrivateZone:
        Ref: PrivateZone
      VSwitchId:
        Ref: VSwitchId
      NatGateway:
        Ref: NatGateway
Parameters:
  VpcId:
    Type: String
    Description: >-
      VPC ID. If not set, the system will automatically create a VPC, and the
      VPC network segment created by the system is 192.168.0.0/16. 

      VpcId and VSwitchId can only be empty at the same time or set the
      corresponding values at the same time.
  Name:
    Type: String
    Description: >-
      The name of the cluster. The cluster name can use uppercase and lowercase
      letters, Chinese characters, numbers, and dashes.
  Tags:
    Type: Json
    Description: Tag the cluster.
  ZoneId:
    Type: String
    Description: The zone ID.
  PrivateZone:
    Type: Boolean
    Description: Whether to enable PrivateZone for service discovery.
    AllowedValues:
      - true
      - false
  VSwitchId:
    Type: String
    Description: >-
      If not set, the system will automatically create a switch, and and the network
      segment of the switch created by the system is 192.168.0.0/18.
  NatGateway:
    Default: false
    Type: Boolean
    Description: >-
      Whether to create a NAT gateway. The value can be true or false. If not
      set, the system defaults to false.
    AllowedValues:
      - true
      - false
Outputs:
  ClusterId:
    Description: Cluster instance ID.
    Value:
      'Fn::GetAtt':
        -ServerlessKubernetesCluster
        - ClusterId
  TaskId:
    Description: >-
      Task ID. Automatically assigned by the system and the user queries the task
      status.
    Value:
      'Fn::GetAtt':
        -ServerlessKubernetesCluster
        -TaskId