All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CS::ManagedKubernetesCluster

Last Updated:Jul 19, 2025

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,
    "SnatEntry": Boolean,
    "VpcId": String,
    "Tags": List,
    "LoginPassword": String,
    "ContainerCidr": String,
    "Name": String,
    "Taint": List,
    "KeyPair": String,
    "Addons": List,
    "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,
    "LoadBalancerSpec": String,
    "FormatDisk": Boolean,
    "NodeCidrMask": String,
    "KeepInstanceName": Boolean,
    "DeletionProtection": Boolean,
    "ResourceGroupId": String,
    "NodePools": List,
    "NodeNameMode": String,
    "SecurityHardeningOs": Boolean,
    "DeleteOptions": List,
    "ControlPlaneLogComponents": List,
    "ControlPlaneLogTtl": Number,
    "ControlPlaneLogProject": String,
    "MaintenanceWindow": Map,
    "ZoneIds": List,
    "VSwitchIds": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Name

String

Yes

No

The name of the cluster.

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

VpcId

String

Yes

No

The ID of the virtual private cloud (VPC).

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 both VpcId and VSwitchIds or leave both properties empty.

Addons

List

No

Yes

The components that you want to use for the cluster.

Valid values:

  • Network component

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

    • Flannel network: [{"Name":"flannel","Config":""}].

    • Terway network: [{"Name": "terway-eniip","Config": ""}].

  • Storage component

    The Container Storage Interface (CSI) and FlexVolume components are supported:

    • CSI: [{"Name":"csi-plugin","Config": ""},{"Name": "csi-provisioner","Config": ""}].

    • FlexVolume: [{"Name": "flexvolume","Config": ""}].

  • (Optional) Simple Log Service component:

    Note

    If you do not activate Simple Log Service, you cannot use the cluster auditing feature.

    • Using an existing SLS Project: [{"Name": "logtail-ds","Config": "{\"IngressDashboardEnabled\":\"true\",\"sls_project_name\":\"your_sls_project_name\"}"}].

    • Creating a new SLS Project: [{"Name": "logtail-ds","Config": "{\"IngressDashboardEnabled\":\"true\"}"}].

  • (Optional) Ingress component

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

    • Installing Ingress and enabling Internet access: [{"Name":"nginx-ingress-controller","Config":"{\"IngressSlbNetworkType\":\"internet\"}"}].

    • Not installing Ingress: [{"Name": "nginx-ingress-controller","Config": "","Disabled": true}].

  • (Optional) Event center: By default, the event center feature is enabled

    You can use Kubernetes event centers to store and query events, and configure alerts. You can use the Logstores that are associated with Kubernetes event centers for free within 90 days. For more information, see Create and use an event center.

    Enabling the event center: [{"Name":"ack-node-problem-detector","Config":"{\"sls_project_name\":\"your_sls_project_name\"}"}].

For more information, see Addons properties.

SecurityHardeningOs

Boolean

No

No

Specifies whether to enable security hardening for Alibaba Cloud Linux.

Valid values:

  • true: enables security hardening.

  • false: disables security hardening.

Default value: false.

CloudMonitorFlags

Boolean

No

No

Specifies whether to install the CloudMonitor agent.

Valid values:

  • true: installs the CloudMonitor agent.

  • false (default): does not install the CloudMonitor agent.

ClusterSpec

String

No

No

The specification of the ACK managed cluster.

Valid values:

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

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

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.

DeletionProtection

Boolean

No

Yes

Specifies whether to enable deletion protection.

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

  • true: enables deletion protection.

  • false (default): disables deletion protection.

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.

EndpointPublicAccess

Boolean

No

No

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

Valid values:

  • true: enables Internet access to the API server.

  • false (default): disables Internet access to the API server. In this case, the cluster can access the API server only over a VPC.

FormatDisk

Boolean

No

No

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

Valid values:

  • true: stores the container and image data of the existing ECS instance on the data disk. 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): does not store the container or image data of the existing ECS instance on the data disk.

IsEnterpriseSecurityGroup

Boolean

No

No

Specifies whether to create an advanced security group.

This property takes effect when SecurityGroupId is left empty. Valid values:

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

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

KeepInstanceName

Boolean

No

No

Specifies whether to retain the names of existing ECS instances in the cluster.

Valid values:

  • true (default): retains the names of existing ECS instances.

  • false: does not retain the names of existing ECS instances. The system assigns new names.

KeyPair

String

No

No

The name of the key pair.

You can specify KeyPair or LoginPassword.

KubernetesVersion

String

No

Yes

The Kubernetes version of the cluster. The Kubernetes versions supported by ACK are the same as the Kubernetes versions supported by open source Kubernetes. We recommend that you use the latest version.

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

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

LoginPassword

String

No

No

The password for SSH logons.

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

Note

You can specify LoginPassword or KeyPair.

NodeCidrMask

String

No

No

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

The value varies based on the CIDR block that you specify for pods. This property takes effect only when you use the Flannel component for the cluster.

Default value: 25.

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 the 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 consists of 5 digits, and the suffix is test, the node name is aliyun.com0****test.

NodePools

List

No

No

The details of the node pools.

For more information, see NodePools properties.

OsType

String

No

No

The OS type.

Valid values:

  • Windows

  • Linux (default)

Platform

String

No

No

The OS distribution.

Valid values:

  • CentOS (default)

  • AliyunLinux

  • QbootAliyunLinux

  • Qboot

  • Windows

  • WindowsCore

PodVswitchIds

List

No

No

The IDs of the pod vSwitches.

For each node vSwitch, 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 CIDR block mask is not greater than 19 bits in length.

Note

If you install the Terway component in the cluster, you must specify this property.

ProxyMode

String

No

No

The kube-proxy mode.

Valid values:

  • iptables (default)

  • ipvs

ResourceGroupId

String

No

Yes

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

None.

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 among Docker, containerd, and Sandboxed-Container.

For more information, see Runtime properties.

SecurityGroupId

String

No

No

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

None.

ServiceCidr

String

No

No

The CIDR block of the Service.

The CIDR block of the 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.

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 values:

  • Valid value if the VPC can access the Internet: false. In this case, you do not need to configure SNAT rules for the VPC.

  • Valid values when 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.

SocEnabled

Boolean

No

No

Specifies whether to enable reinforcement based on classified protection.

Valid values:

  • true: Enable.

  • false (default value): disable.

Tags

List

No

Yes

The tags of the cluster.

You can add up to 20 tags.

For more information, see Tags properties.

Taint

List

No

No

The taints that you want to 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.

TimeoutMins

Number

No

No

The timeout period of cluster creation.

Default value: 60.

Unit: minutes.

UserData

String

No

No

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

The user data can be up to 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 the escape character (\) before each special character.

DeleteOptions

List

No

Yes

Deletion configurations of cluster resources.

For more information, see DeleteOptions properties.

ControlPlaneLogTtl

Number

No

Yes

The retention period of control plane logs in days.

None.

ControlPlaneLogComponents

List

No

Yes

The list of component names.

You can use this property to specify the control plane components whose logs you want to collect.

By default, the logs of kube-apiserver, kube-controller-manager, and kube-scheduler are collected.

ControlPlaneLogProject

String

No

Yes

The Simple Log Service (SLS) project that you want to use to store the logs of control plane components.

You can use an existing project or a new project. If you choose to automatically create an SLS project, the system creates a project named k8s-log-{ClusterID}.

MaintenanceWindow

Map

No

Yes

The maintenance window configurations of the cluster.

For more information, see MaintenanceWindow properties.

VSwitchIds

List

Yes

No

The vSwitches to which worker nodes are bound.

None.

ZoneIds

List

No

No

The zones.

None.

NodePools syntax

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

NodePools properties

Property

Type

Required

Allow Updates

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 about the cluster.

For more information, see KubernetesConfig properties.

NodePoolInfo

Map

No

No

The configuration of the node pool.

For more information, see NodePoolInfo properties.

ScalingGroup syntax

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

ScalingGroup properties

Property

Type

Required

Allow updates

Description

Constraint

InstanceTypes

List

Yes

No

The instance types.

None.

SystemDiskSize

Integer

Yes

No

The system disk size of the nodes.

Unit: GiB.

Valid values: 40 to 500.

VSwitchIds

List

Yes

No

The IDs of the vSwitches.

None.

DesiredSize

Integer

No

No

The expected number of nodes in the node pool.

None.

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.

ImageId

String

No

No

The ID of the custom image.

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

InstanceChargeType

String

No

No

The billing method of the nodes in the node pool.

Valid values:

  • PrePaid: subscription.

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

InternetChargeType

String

No

No

The billing method of the public IP address.

Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

InternetMaxBandwidthOut

Integer

No

No

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

Unit: Mbit/s.

Valid values: 1 to 100.

IsEnterpriseSecurityGroup

Boolean

No

No

Specifies whether to automatically create an advanced security group.

Valid values:

  • true: creates and uses an advanced security group.

  • false: does not use an advanced security group.

KeyPair

String

No

No

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

You can specify KeyPair or LoginPassword.

LoginPassword

String

No

No

The password for SSH logon.

You can specify KeyPair or LoginPassword.

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

Period

Integer

No

No

The subscription duration of the nodes in the node pool.

You must specify this property only when InstanceChargeType is set to PrePaid.

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

Default value: 1.

PeriodUnit

String

No

No

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

You must specify this property when InstanceChargeType is set to PrePaid.

Set the value to Month.

RdsInstances

List

No

No

The IDs of the ApsaraDB RDS instances.

None.

SystemDiskCategory

String

No

No

The system disk category of the nodes.

Valid values:

  • cloud_efficiency (default): ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD (ESSD).

SystemDiskPerformanceLevel

String

No

No

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

This property takes effect only for ESSDs.

Tags

List

No

No

The tags that you want to add to the ECS instances.

For more information, see Tags properties.

ZoneIds

List

No

No

The zones.

None.

DataDisks syntax

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

DataDisks properties

Property

Type

Required

Allow updates

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.

Category

String

No

No

The data disk category.

Valid values:

  • cloud: basic disk.

  • cloud_efficiency (default): ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

Encrypted

Boolean

No

No

Specifies whether to encrypt data disks.

Valid values:

  • true: encrypts the data disks.

  • false (default): does not encrypt the data disks.

PerformanceLevel

String

No

No

The PL of the data disk for nodes.

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

For more information, see ESSDs.

Size

Integer

No

No

The data disk size.

Unit: GiB.

Valid values: 40 to 32768.

Default value: 120.

KubernetesConfig syntax

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

KubernetesConfig properties

Property

Type

Required

Allow Updates

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 nodes.

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

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

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

Labels

List

No

No

The labels of the nodes.

You can add labels to the nodes in the cluster.

For more information, see Labels 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 the 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 consists of 5 digits, and the suffix is test, the node name is aliyun.com0****test.

Taints

List

No

No

Taint configuration.

For more information, see Taints properties.

Labels syntax

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

Labels properties

Property

Type

Required

Allow updates

Description

Constraint

Key

String

Yes

No

The key of the label.

None.

Value

String

Yes

No

The value of the label.

None.

Taints syntax

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

Taints properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The taint name.

None.

Value

String

Yes

No

The taint value.

None.

Effect

String

No

No

The scheduling policy.

  • 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.

NodePoolInfo syntax

"NodePoolInfo": {
  "Name": String,
  "Type": String,
  "ResourceGroupId": String
}

NodePoolInfo properties

Property

Type

Required

Allow updates

Description

Constraint

ResourceGroupId

String

No

Yes

The resource group to which the node pool belongs.

None.

Name

String

Yes

No

The name of the node pool.

None.

Type

String

No

No

The type of the node pool.

Valid values:

  • ESS: ESS node pool.

  • edge: edge node pool.

MaintenanceWindow syntax

"MaintenanceWindow": {
  "Enable": Boolean,
  "MaintenanceTime": String,
  "Duration": String,
  "WeeklyPeriod": String,
  "Recurrence": String
}

MaintenanceWindow properties

Property

Type

Required

Allow updates

Description

Constraint

Duration

String

No

Yes

The duration of the maintenance window.

Valid values: 1 to 24. Unit: hour.

Default value: 3.

Enable

Boolean

No

Yes

Specifies whether to enable the maintenance window.

Valid values:

  • true: enables the maintenance window.

  • false: disables the maintenance window.

Default value: false.

MaintenanceTime

String

No

Yes

The start time of the maintenance window.

Specify the time in the RFC 3339 format.

WeeklyPeriod

String

No

Yes

The maintenance cycle.

Separate multiple values with commas (,). Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

Default value: Thursday.

Recurrence

String

No

Yes

The recurrence rule defined for the maintenance window using the RFC 5545 recurrence rule.

You must set FREQ to WEEKLY and cannot specify COUNT or UNTIL.

Tags syntax

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

Tags properties

Property

Type

Required

Allow Updates

Description

Constraint

Key

String

Yes

No

The key of the tag.

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

Value

String

Yes

No

The value of the tag.

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

Addons syntax

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

Addons properties

Property

Type

Required

Allow updates

Description

Constraint

Name

String

Yes

No

The name of the component.

None.

Config

String

No

Yes

The configurations of the component.

None.

Disabled

Boolean

No

No

Specifies whether to disable default installation for the component.

Valid values:

  • true (default): disables default installation.

  • false: enables default installation.

Version

String

No

No

The version of the component.

By default, the latest version is used.

DeleteOptions syntax

"DeleteOptions": [
    {
      "DeleteMode": String,
      "ResourceType": String
    }
  ]

DeleteOptions properties

Property

Type

Required

Allow Updates

Description

Constraint

DeleteMode

String

No

Yes

The policy that specifies whether to delete the specified type of resources.

Valid values:

  • delete: deletes the specified type of resources.

  • retain: retains the specified type of resources.

ResourceType

String

No

Yes

The type of the resources.

Valid values:

  • SLB: SLB resources created for Services. By default, the SLB resources are deleted.

  • ALB: Application Load Balancer (ALB) resources created by the ALB Ingress controller. By default, the ALB resources are retained.

  • SLS_Data: Simple Log Service projects used by the cluster logging feature. By default, the Simple Log Service projects are retained.

  • SLS_ControlPlane: Simple Log Service projects used to store the logs of control planes in ACK managed clusters. By default, the Simple Log Service projects are retained.

  • PrivateZone: Alibaba Cloud DNS PrivateZone resources created by ACK Serverless clusters. By default, the Alibaba Cloud DNS PrivateZone resources are retained.

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.

ACK supports the following types of container runtimes:

  • containerd: recommended. It supports all cluster versions.

  • Sandboxed-Container.runv: sandboxed container that provides higher isolation. It supports Kubernetes 1.24 and earlier.

  • docker: supports Kubernetes 1.22 and earlier.

Default value: containerd

Version

String

No

No

The version of the container runtime.

By default, the latest version is used.

For more information about changes to the sandboxed container runtime, see Release notes for Sandboxed-Container.

Return values

Fn::GetAtt

  • ClusterId: the ID of the cluster.

  • TaskId: the ID of the task. The system automatically assigns the task ID, which you can use to query the task status.

  • DefaultUserKubeConfig: the default kubeconfig file of the cluster credentials.

  • ScalingRuleId: the ID of the scaling rule.

  • ScalingGroupId: the ID of the scaling group.

  • PrivateUserKubConfig: the private kubeconfig file of the cluster credentials.

  • ScalingConfigurationId: the ID of the scaling configuration.

  • Nodes: the nodes in the cluster.

  • APIServerSLBId: the ID of the SLB instance that is associated with the API server.

  • IngressSLBId: the ID of the SLB Ingress.

  • WorkerRamRoleName: the name of the RAM role for worker nodes.

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
      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",
        "LoginPassword": "Admin@123!",
        "Name": "mytest"
      }
    }
  },
  "Outputs": {
    "ClusterId": {
      "Value": {
        "Fn::GetAtt": [
          "ManagedKubernetesCluster",
          "ClusterId"
        ]
      }
    },
    "TaskId": {
      "Value": {
        "Fn::GetAtt": [
          "ManagedKubernetesCluster",
          "TaskId"
        ]
      }
    }
  }
}