All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CS::ManagedKubernetesCluster

Last Updated:Feb 26, 2024

ALIYUN::CS::ManagedKubernetesCluster is used to create a Container Service for Kubernetes (ACK) managed cluster.

Syntax

{
  "Type": "ALIYUN::CS::ManagedKubernetesCluster",
  "Properties": {
    "CloudMonitorFlags": Boolean,
    "ProxyMode": String,
    "WorkerDataDisk": Boolean,
    "SnatEntry": Boolean,
    "VSwitchIds": List,
    "WorkerSystemDiskCategory": String,
    "VpcId": String,
    "Tags": List,
    "WorkerSystemDiskSize": Number,
    "WorkerInstanceTypes": List,
    "WorkerDataDisks": List,
    "LoginPassword": String,
    "ContainerCidr": String,
    "NumOfNodes": Number,
    "Name": String,
    "Taint": List,
    "KeyPair": String,
    "Addons": List,
    "DisableRollback": Boolean,
    "ServiceCidr": String,
    "KubernetesVersion": String,
    "SecurityGroupId": String,
    "EndpointPublicAccess": Boolean,
    "ClusterSpec": String,
    "TimeoutMins": Number,
    "PodVswitchIds": List,
    "EncryptionProviderKey": String,
    "Runtime": Map,
    "SocEnabled": Boolean,
    "UserData": String,
    "OsType": String,
    "IsEnterpriseSecurityGroup": Boolean,
    "Platform": String,
    "AutoRenewPeriod": Number,
    "LoadBalancerSpec": String,
    "AutoRenew": Boolean,
    "ChargeType": String,
    "FormatDisk": Boolean,
    "Period": Number,
    "NodeCidrMask": String,
    "PeriodUnit": String,
    "KeepInstanceName": Boolean,
    "DeletionProtection": Boolean,
    "ZoneIds": List,
    "ResourceGroupId": String,
    "NodePools": List,
    "NodeNameMode": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

CloudMonitorFlags

Boolean

No

No

Specifies whether to install CloudMonitor agents.

Valid values:

  • true

  • false (default)

Runtime

Map

No

No

The container runtime.

The Runtime property consists of the following fields:

  • name: the name of the container runtime

  • version: the version of the container runtime

Example:

{"name": "docker", "version": "19.03.5"}

For more information about how to select a container runtime, see Comparison of Docker, containerd, and Sandboxed-Container.

For more information about the Runtime property, see Runtime properties.

ProxyMode

String

No

No

The kube-proxy mode.

Valid values:

  • iptables (default)

  • ipvs

SnatEntry

Boolean

No

No

Specifies whether to configure SNAT rules for the virtual private cloud (VPC) in which you want to deploy the cluster.

  • Valid value if the VPC can access the Internet: false.

  • Valid values if the VPC cannot access the Internet:

    • true: configures SNAT rules. The VPC can access the Internet.

    • false: does not configure SNAT rules. The VPC cannot access the Internet.

WorkerSystemDiskCategory

String

No

No

The system disk category of worker nodes.

Valid values:

  • cloud_efficiency (default): ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: Enhanced SSD (ESSD)

VpcId

String

Yes

No

The VPC ID.

If you do not specify this property, the system automatically creates a VPC whose CIDR block is 192.168.0.0/16.

You must specify the VpcId and VSwitchIds properties or leave both properties empty.

Tags

List

No

Yes

The tags of the cluster.

You can specify up to 20 tags.

For more information, see Tags properties.

WorkerInstanceTypes

List

No

Yes

The Elastic Compute Service (ECS) instance types of worker nodes.

For more information, see Overview of instance families.

WorkerDataDisks

List

No

Yes

The configurations of the data disks that you want to attach to worker nodes. The configurations include disk categories and disk sizes.

This property takes effect only if you attach data disks to worker nodes.

For more information, see WorkerDataDisks properties.

LoginPassword

String

No

No

The password for SSH logon.

The password must be 8 to 30 characters in length, and must contain letters, digits, and special characters. Special characters include ( ) ' ~ ! @ # $ % ^ & * - + = | { } [ ] : ; < > , . ? / _.

Note

You can specify only one of the LoginPassword and KeyPair properties.

ContainerCidr

String

No

No

The CIDR block of the container.

The CIDR block of the container cannot overlap with the CIDR block of the VPC. If you use the VPC that is automatically created by the system, the CIDR block 172.16.0.0/16 is used by default.

ZoneIds

List

No

No

The IDs of the zones to which the vSwitches of worker nodes belong.

None.

ResourceGroupId

String

No

Yes

The ID of the resource group to which the cluster belongs.

None.

NumOfNodes

Number

No

Yes

The number of worker nodes.

Valid values: 0 to 300.

Default value: 3.

Name

String

Yes

No

The cluster name.

The name must be 1 to 63 characters in length, and can contain letters, digits, and hyphens (-).

WorkerSystemDiskSize

Number

No

No

The system disk size of worker nodes.

Default value: 120.

Unit: GiB.

Taint

List

No

No

The taints that you add to nodes to ensure that pods are appropriately scheduled.

If you apply tolerations to pods, the pods can be scheduled to nodes that have matching taints.

WorkerDataDisk

Boolean

No

No

Specifies whether to attach data disks to worker nodes.

Valid values:

  • true

  • false (default)

Addons

List

No

No

The add-on components that you want to use for the cluster.

Valid values:

  • Network components.

    The Flannel component and the Terway component are supported. You must select one of the preceding components when you create a cluster.

    • If you want to use the Flannel component, specify the value in the [{"Name":"flannel","Config":""}] format.

    • If you want to use the Terway component, specify the value in the [{"Name": "terway-eniip","Config": ""}] format.

  • Storage components.

    The Container Storage Interface (CSI) component and the FlexVolume component are supported.

    • If you want to use the CSI component, specify the value in the [{"Name":"csi-plugin","Config": ""},{"Name": "csi-provisioner","Config": ""}] format.

    • If you want to use the FlexVolume component, specify the value in the [{"Name": "flexvolume","Config": ""}] format.

  • (Optional) Simple Log Service components. You can use an existing Simple Log Service project or create a Simple Log Service project.

    Note

    To use the cluster auditing feature, you must activate Simple Log Service.

    • If you want to use an existing Simple Log Service project, specify the value in the [{"Name": "logtail-ds","Config": "{\"IngressDashboardEnabled\":\"true\",\"sls_project_name\":\"your_sls_project_name\"}"}] format.

    • If you want to create a Simple Log Service project, specify the value in the [{"Name": "logtail-ds","Config": "{\"IngressDashboardEnabled\":\"true\"}"}] format.

  • (Optional) Ingress component.

    By default, the nginx-ingress-controller component is installed for ACK dedicated clusters.

    • If you want to install the nginx-ingress-controller component and enabled Internet access, specify the value in the [{"Name":"nginx-ingress-controller","Config":"{\"IngressSlbNetworkType\":\"internet\"}"}] format.

    • If you do not want to install the nginx-ingress-controller component, specify the value in the [{"Name": "nginx-ingress-controller","Config": "","Disabled": true}] format.

  • (Optional) Event center.

    By default, the event center feature is enabled for the cluster. You can use the Kubernetes event center to store and query events, and configure alert rules. You can use the Logstores that are associated with the Kubernetes event center free of charge within 90 days. For more information, see Create and use an event center.

    If you want to enable the event center feature, specify the value in the [{"Name":"ack-node-problem-detector","Config":"{\"sls_project_name\":\"your_sls_project_name\"}"}] format.

For more information, see Addons properties.

DisableRollback

Boolean

No

No

Specifies whether to perform a rollback if the cluster fails to be created.

Valid values:

  • true (default)

  • false

    Note

    If you set this property to true, the resources that are generated when you create the cluster are released. We recommend that you do not set this property to true.

ServiceCidr

String

No

No

The CIDR block of the ACK service.

The CIDR block of the ACK service cannot overlap with the CIDR block of the VPC or container. If you use the VPC that is automatically created by the system, the CIDR block 172.19.0.0/20 is used by default.

KubernetesVersion

String

No

No

The Kubernetes version of the cluster. ACK supports all open source Kubernetes versions. We recommend that you use the latest version.

You can create clusters of the two latest versions. For more information about the Kubernetes versions supported by ACK, see Overview of Kubernetes versions supported by ACK.

SecurityGroupId

String

No

No

The ID of the security group to which the ECS instances in the cluster belong.

None.

KeyPair

String

No

No

The name of the key pair.

You can specify the LoginPassword or KeyPair property.

EndpointPublicAccess

Boolean

No

No

Specifies whether to allow the cluster to access the API server over the Internet.

Valid values:

  • true

  • false (default): The cluster can access the API server only over a VPC.

ClusterSpec

String

No

No

The type of the ACK managed cluster.

Valid values:

  • ack.pro.small: an ACK Pro cluster.

  • ack.standard (default): an ACK standard cluster

TimeoutMins

Number

No

No

The timeout period that is allowed to create the cluster.

Default value: 60.

Unit: minutes.

PodVswitchIds

List

No

No

The IDs of pod vSwitches.

For each vSwitch that you allocate to a node, you must specify at least one pod vSwitch that is deployed in the same zone as the node vSwitch. The pod vSwitch cannot overlap with the node vSwitch.

We recommend that you use a vSwitch whose mask of the CIDR block is less than or equal to 19 bits in length.

Note

This property is required if you use the Terway component for the cluster.

EncryptionProviderKey

String

No

No

The ID of the key that is managed by Key Management Service (KMS).

The key is used to encrypt data disks. You can use KMS only for ACK Pro clusters.

VSwitchIds

List

Yes

No

The vSwitch IDs of worker nodes.

You can specify one to three vSwitch IDs.

SocEnabled

Boolean

No

No

Specifies whether to enable reinforcement based on classified protection.

Valid values:

  • true

  • false (default)

UserData

String

No

No

The user data that you want to pass when you create ECS instances.

The data must be 16 KB in size. You do not need to convert the data into Base64-encoded strings. If the user data contains special characters, you must add an escape character (\) before each special character.

OsType

String

No

No

The OS type

Valid values:

  • Windows

  • Linux (default)

IsEnterpriseSecurityGroup

Boolean

No

No

Specifies whether to create an advanced security group.

This property takes effect when you leave the SecurityGroupId property empty. Valid values:

  • true: creates an advanced security group. If you install the Terway component for a cluster, you must create an advanced security group.

  • false (default): does not create an advanced security group.

Platform

String

No

No

The release version of the OS.

Valid values:

  • CentOS (default)

  • AliyunLinux

  • QbootAliyunLinux

  • Qboot

  • Windows

  • WindowsCore

AutoRenewPeriod

Number

No

No

The auto-renewal period.

This property takes effect when you set the ChargeType property to PrePaid and the AutoRenew property to true.

  • Valid values if you set the PeriodUnit property to Week: 1, 2, and 3.

  • Valid values if you set the PeriodUnit property to Month: 1, 2, 3, 6, and 12.

Default value: 1.

LoadBalancerSpec

String

No

No

The specification of the Server Load Balancer (SLB) instance.

Valid values:

  • slb.s1.small

  • slb.s2.small

  • slb.s2.medium

  • slb.s3.small

  • slb.s3.medium

  • slb.s3.large

AutoRenew

Boolean

No

No

Specifies whether to enable auto-renewal for the cluster.

This property takes effect when you set the ChargeType property to PrePaid. Valid values:

  • true (default)

  • false

ChargeType

String

No

No

The billing method.

Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

FormatDisk

Boolean

No

No

Specifies whether to attach the data disk to a node that is created based on an existing ECS instance.

Valid values:

  • true: In this case, the container and image data of the existing ECS instance are stored on the data disk and the existing data on the data disk is overwritten. Before you attach the data disk, back up the data on the data disk.

  • false (default): In this case, the container or image data of the existing ECS instance are not stored on the data disk.

Period

Number

No

No

The subscription duration of the cluster.

This property takes effect when you set the ChargeType property to PrePaid.

  • Valid values if you set the PeriodUnit property to Week: 1, 2, 3, and 4.

  • Valid values if you set the PeriodUnit property to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

Default value: 1.

NodeCidrMask

String

No

No

The maximum number of IP addresses that can be assigned to nodes.

The value is determined by the CIDR block that you specify for pods. This property takes effect only if you install the Flannel component in the cluster.

Default value: 25.

PeriodUnit

String

No

No

The unit of the subscription duration.

This property takes effect when you set the ChargeType property to PrePaid. Valid values:

  • Week

  • Month (default)

KeepInstanceName

Boolean

No

No

Specifies whether to retain the name of an existing ECS instance that is used in the cluster.

Valid values:

  • true (default)

  • false: The system assigns a name for the existing ECS instance.

DeletionProtection

Boolean

No

No

Specifies whether to enable deletion protection.

After you enable deletion protection, you cannot delete the cluster by using the ACK console or calling specific ACK API operations. Valid values:

  • true

  • false (default)

NodePools

List

No

No

The information about the node pools.

For more information, see NodePools properties.

NodeNameMode

String

No

No

The custom name of the node.

A node name consists of a prefix, an IP address substring, and a suffix.

  • The prefix and suffix can contain one or more parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). The node name must start and end with a lowercase letter or a digit.

  • The IP address substring consists of 5 to 12 digits that are truncated from the end of the node IP address.

For example, if the node IP address is 192.168.XX.XX, the prefix is aliyun.com, the IP address substring is 5 digits in length, and the suffix is test, the node name is aliyun.com0****test.

NodePools syntax

"NodePools": [
  {
    "ScalingGroup": Map,
    "KubernetesConfig": Map,
    "NodePoolInfo": Map,
    "Count": Integer
  }
]

NodePools properties

Property

Type

Required

Editable

Description

Constraint

ScalingGroup

Map

Yes

No

The configurations of the scaling group that is used by the node pool.

For more information, see ScalingGroup properties.

KubernetesConfig

Map

No

No

The configurations of the cluster.

For more information, see KubernetesConfig properties.

NodePoolInfo

Map

No

No

The configurations of the node pool.

For more information, see NodePoolInfo property.

Count

Integer

No

No

The number of nodes in the node pool.

None.

ScalingGroup syntax

"ScalingGroup": {
  "RdsInstances": List,
  "IsEnterpriseSecurityGroup": Boolean,
  "VSwitchIds": List,
  "InternetMaxBandwidthOut": Integer,
  "DataDisks": List,
  "Period": Integer,
  "InternetChargeType": String,
  "KeyPair": String,
  "SystemDiskPerformanceLevel": String,
  "ImageId": String,
  "Platform": String,
  "InstanceTypes": List,
  "SystemDiskCategory": String,
  "PeriodUnit": String,
  "LoginPassword": String,
  "InstanceChargeType": String,
  "SystemDiskSize": Integer,
  "Tags": List,
  "ZoneIds": List
}

ScalingGroup properties

Property

Type

Required

Editable

Description

Constraint

RdsInstances

List

No

No

The IDs of the ApsaraDB RDS instances.

None.

IsEnterpriseSecurityGroup

Boolean

No

No

Specifies whether to automatically create an enterprise-class security group.

Valid values:

  • true

  • false

VSwitchIds

List

Yes

No

The IDs of the vSwitches.

None.

InternetMaxBandwidthOut

Integer

No

No

The maximum outbound bandwidth of the public IP address of the node.

Unit: Mbit/s.

Valid values: 1 to 100.

DataDisks

List

No

No

The configurations of the data disks that are attached to the nodes in the node pool.

For more information, see DataDisks properties.

Period

Integer

No

No

The subscription duration of the nodes in the node pool.

This property takes effect only when you set the InternetChargeType property to PrePaid.

Valid values if the PeriodUnit property is set to Month: 1, 2, 3, 6, and 12.

Default value: 1.

InternetChargeType

String

No

No

The billing method of the nodes in the node pool.

Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

KeyPair

String

No

No

The name of the key pair that is used for password-free logon.

You can specify the KeyPair or LoginPassword property.

SystemDiskPerformanceLevel

String

No

No

The performance level (PL) of the system disks for nodes.

This property takes effect only for ESSDs.

ImageId

String

No

No

The ID of the custom image.

By default, the image that is provided by ACK is used.

Platform

String

No

No

The OS distribution.

Valid values:

  • CentOS

  • AliyunLinux (default)

  • Windows

  • WindowsCore

InstanceTypes

List

Yes

No

The instance types.

None.

SystemDiskCategory

String

No

No

The system disk category of the node.

Valid values:

  • cloud_efficiency (default): ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

PeriodUnit

String

No

No

The unit of the subscription duration of the nodes in the node pool.

This property is required if you set the InternetChargeType property to PrePaid.

A value of Month indicates that the subscription duration is measured in months.

LoginPassword

String

No

No

The password for SSH logon.

You can specify the KeyPair or LoginPassword property.

The password must be 8 to 30 characters in length, and must contain uppercase letters, lowercase letters, digits, and special characters.

InstanceChargeType

String

No

No

The billing method of the nodes in the node pool.

Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

SystemDiskSize

Integer

Yes

No

The size of the system disk.

Unit: GiB.

Valid values: 40 to 500.

Tags

List

No

No

The tags of the ECS instances.

For more information, see Tags properties.

ZoneIds

List

No

No

The zone IDs.

None.

DataDisks syntax

"DataDisks": [
  {
    "AutoSnapshotPolicyId": String,
    "Encrypted": Boolean,
    "Size": Integer,
    "Category": String,
    "PerformanceLevel": String
  }
]

DataDisks properties

Property

Type

Required

Editable

Description

Constraint

AutoSnapshotPolicyId

String

No

No

The ID of the automatic snapshot policy.

The system automatically backs up cloud disks based on the specified automatic snapshot policy.

Encrypted

Boolean

No

No

Specifies whether to encrypt the data disk.

Valid values:

  • true

  • false (default)

Size

Integer

No

No

The size of the data disk.

Unit: GiB.

Valid values: 40 to 32768.

Default value: 120.

Category

String

No

No

The category of the data disk.

Valid values:

  • cloud: basic disk

  • cloud_efficiency (default): ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

PerformanceLevel

String

No

No

The PL of the data disks for nodes.

This property takes effect only for ESSDs. The PL of a data disk varies based on the disk size.

For more information, see ESSDs.

KubernetesConfig syntax

"KubernetesConfig": {
  "Runtime": String,
  "RuntimeVersion": String,
  "CpuPolicy": String,
  "Labels": List,
  "NodeNameMode": String,
  "Taints": List
}

KubernetesConfig properties

Property

Type

Required

Editable

Description

Constraint

Runtime

String

Yes

No

The container runtime.

None.

RuntimeVersion

String

Yes

No

The version of the container runtime.

None.

CpuPolicy

String

No

No

The CPU management policy of the node.

Valid values if the Kubernetes version of the cluster is 1.12.6 or later:

  • static: grants the pods that have specific resource characteristics on the node with enhanced CPU affinity and exclusivity.

  • none (default): uses the default CPU affinity.

Labels

List

No

No

The labels that you want to add to the nodes.

You can add labels to the nodes in the cluster.

For more information, see the "Labels properties" section.

NodeNameMode

String

No

No

The custom name of the node.

A node name consists of a prefix, an IP address substring, and a suffix.

  • The prefix and suffix can contain one or more parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). The node name must start and end with a lowercase letter or a digit.

  • The IP address substring consists of 5 to 12 digits that are truncated from the end of the node IP address.

For example, if the node IP address is 192.168.XX.XX, the prefix is aliyun.com, the IP address substring is 5 digits in length, and the suffix is test, the node name is aliyun.com0****test.

Taints

List

No

No

The taints.

For more information, see Taints properties.

Labels syntax

"Labels": {
 "Value": String,
 "Key": String
}

Labels properties

Property

Type

Required

Editable

Description

Constraint

Value

String

Yes

No

The label value.

None.

Key

String

Yes

No

The label key.

None.

Taints syntax

"Taints": [{
 "Value": String,
 "Effect": String,
 "Key": String
}]

Taints properties

Property

Type

Required

Editable

Description

Constraint

Value

String

Yes

No

The taint value.

None.

Effect

String

No

No

The scheduling policy of the taint.

  • NoSchedule (default): Pods that do not tolerate the taint are not scheduled to the node that contains this taint. This policy affects only the scheduling process and takes effect only for newly added pods. This policy does not affect scheduled pods.

  • NoExecute: Pods that do not tolerate the taint are evicted after you add this taint to the node.

  • PreferNoSchedule: This is a preference or soft version of NoSchedule. This policy does not affect existing pods on the node.

Key

String

Yes

No

The taint key.

None.

NodePoolInfo syntax

"NodePoolInfo": {
  "Name": String
}

NodePoolInfo property

Property

Type

Required

Editable

Description

Constraint

Name

String

Yes

No

The name of the node pool.

None.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key must be 1 to 64 characters in length and cannot start with aliyun, acs:, https://, or http://.

Value

String

Yes

No

The tag value.

The tag value can be up to 128 characters in length and cannot start with aliyun, acs:, https://, or http://.

WorkerDataDisks syntax

"WorkerDataDisks": [
  {
    "Category": String,
    "Size": Number
  }
]

WorkerDataDisks properties

Property

Type

Required

Editable

Description

Constraint

Category

String

Yes

Yes

The data disk category for worker nodes.

Valid values:

  • cloud: basic disk

  • cloud_ssd: standard SSD

  • cloud_efficiency (default): ultra disk

  • cloud_essd: ESSD

Size

Number

Yes

Yes

The size of the data disk.

Valid values: 40 to 32768.

Unit: GiB.

Addons syntax

"Addons": [
  {
    "Version": String,
    "Config": String,
    "Name": String,
    "Disabled": Boolean
  }
]

Addons properties

Property

Type

Required

Editable

Description

Constraint

Version

String

No

No

The version of the addon plug-in.

By default, the latest version is used.

Config

String

No

No

The configurations of the add-on plug-in.

None.

Name

String

Yes

No

The name of the addon plug-in.

None.

Disabled

Boolean

No

No

Specifies whether to disable automatic installation for the component.

Valid values:

  • true (default)

  • false

Runtime syntax

"Runtime": {
    "Name": String,
    "Version": String
  }

Runtime properties

Property

Type

Required

Editable

Description

Constraint

Name

String

Yes

No

The name of the container runtime.

Valid values:

  • containerd

  • docker (default)

  • Sandboxed-Container.runv

Version

String

No

No

The version of the container runtime.

  • Set the value to 1.4.4 if you set the Name property to containerd.

  • Set the value to 19.03.5 if you set the Name property to docker.

  • Set the value to 3.4.1 if you set the Name property to Sandboxed-Container.runv.

Return values

Fn::GetAtt

  • ClusterId: the cluster ID.

  • TaskId: the task ID. The task ID is automatically assigned by the system and can be used to query the status of the task.

  • WorkerRamRoleName: the name of the RAM role that is assumed by the worker node.

  • DefaultUserKubeConfig: the default configurations of user credentials for the cluster.

  • ScalingRuleId: the ID of the scaling rule.

  • ScalingGroupId: the ID of the scaling group.

  • PrivateUserKubConfig: the private configurations of user credentials for the cluster.

  • ScalingConfigurationId: the ID of the scaling configuration.

  • Nodes: the nodes in the cluster.

  • APIServerSLBId: the ID of the SLB instance that is used by the API server.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Description: Test Create ManagedKubernetesCluster
    Parameters: {}
    Resources:
      Vpc:
        Type: ALIYUN::ECS::VPC
        Properties:
          VpcName: mytest
          CidrBlock: 192.168.0.0/16
      VSwitch:
        Type: ALIYUN::ECS::VSwitch
        Properties:
          VSwitchName: mytest
          VpcId:
            Ref: Vpc
          ZoneId:
            Fn::Select:
              - '0'
              - Fn::GetAZs:
                  Ref: ALIYUN::Region
          CidrBlock: 192.168.1.0/24
      ManagedKubernetesCluster:
        Type: ALIYUN::CS::ManagedKubernetesCluster
        Properties:
          VSwitchIds:
            - Ref: VSwitch
          VpcId:
            Ref: Vpc
          ClusterSpec: ack.pro.small
          WorkerInstanceTypes:
            - ecs.c5.large
          WorkerSystemDiskCategory: cloud_essd
          LoginPassword: Admin@123!
          Name: mytest
    Outputs:
      ClusterId:
        Value:
          Fn::GetAtt:
            - ManagedKubernetesCluster
            - ClusterId
      TaskId:
        Value:
          Fn::GetAtt:
            - ManagedKubernetesCluster
            - TaskId         
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Description": "Test Create ManagedKubernetesCluster",
      "Parameters": {
      },
      "Resources": {
        "Vpc": {
          "Type": "ALIYUN::ECS::VPC",
          "Properties": {
            "VpcName": "mytest",
            "CidrBlock": "192.168.0.0/16"
          }
        },
        "VSwitch": {
          "Type": "ALIYUN::ECS::VSwitch",
          "Properties": {
            "VSwitchName": "mytest",
            "VpcId": {
              "Ref": "Vpc"
            },
            "ZoneId": {
              "Fn::Select": [
                "0",
                {
                  "Fn::GetAZs": {
                    "Ref": "ALIYUN::Region"
                  }
                }
              ]
            },
            "CidrBlock": "192.168.1.0/24"
          }
        },
        "ManagedKubernetesCluster": {
          "Type": "ALIYUN::CS::ManagedKubernetesCluster",
          "Properties": {
            "VSwitchIds": [
              {
                "Ref": "VSwitch"
              }
            ],
            "VpcId": {
              "Ref": "Vpc"
            },
            "ClusterSpec": "ack.pro.small",
            "WorkerInstanceTypes": [
              "ecs.c5.large"
            ],
            "WorkerSystemDiskCategory": "cloud_essd",
            "LoginPassword": "Admin@123!",
            "Name": "mytest"
          }
        }
      },
      "Outputs": {
        "ClusterId": {
          "Value": {
            "Fn::GetAtt": [
              "ManagedKubernetesCluster",
              "ClusterId"
            ]
          }
        },
        "TaskId": {
          "Value": {
            "Fn::GetAtt": [
              "ManagedKubernetesCluster",
              "TaskId"
            ]
          }
        }
      }
    }

For more examples, visit ManagedKubernetesCluster.json and ManagedKubernetesCluster.yml.