All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CS::KubernetesCluster

Last Updated:Nov 27, 2024

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

Syntax

{
  "Type": "ALIYUN::CS::KubernetesCluster",
  "Properties": {
    "CloudMonitorFlags": Boolean,
    "ProxyMode": String,
    "MasterInstanceTypes": List,
    "SnatEntry": Boolean,
    "WorkerSystemDiskCategory": String,
    "WorkerVSwitchIds": List,
    "VpcId": String,
    "Tags": List,
    "CpuPolicy": String,
    "WorkerInstanceTypes": List,
    "WorkerDataDisks": List,
    "LoginPassword": String,
    "ContainerCidr": String,
    "NumOfNodes": Number,
    "Name": String,
    "WorkerSystemDiskSize": Number,
    "NodePortRange": String,
    "SshFlags": Boolean,
    "Taint": List,
    "MasterDataDisk": Boolean,
    "MasterSystemDiskCategory": String,
    "WorkerDataDisk": Boolean,
    "Addons": List,
    "DisableRollback": Boolean,
    "ServiceCidr": String,
    "KubernetesVersion": String,
    "SecurityGroupId": String,
    "KeyPair": String,
    "MasterVSwitchIds": List,
    "EndpointPublicAccess": Boolean,
    "MasterSystemDiskSize": Number,
    "MasterDataDisks": List,
    "MasterCount": Number,
    "TimeoutMins": Number,
    "PodVswitchIds": List,
    "Runtime": Map,
    "ResourceGroupId": String,
    "AutoRenewPeriod": Number,
    "MasterSystemDiskSnapshotPolicyId": String,
    "FormatDisk": Boolean,
    "WorkerSystemDiskSnapshotPolicyId": String,
    "KeepInstanceName": Boolean,
    "DeletionProtection": Boolean,
    "OsType": String,
    "LoadBalancerSpec": String,
    "AutoRenew": Boolean,
    "ChargeType": String,
    "NodeCidrMask": String,
    "UserData": String,
    "UserCa": String,
    "IsEnterpriseSecurityGroup": Boolean,
    "Period": Number,
    "MasterSystemDiskPerformanceLevel": String,
    "SocEnabled": Boolean,
    "TimeZone": String,
    "Platform": String,
    "PeriodUnit": String,    
    "MasterZoneIds": List,
    "WorkerZoneIds": List,
    "NodePools": List,
    "NodeNameMode": String,
    "SecurityHardeningOs": Boolean,
    "DeleteOptions": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

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"}
Note

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

CloudMonitorFlags

Boolean

No

No

Specifies whether to install the CloudMonitor agent.

Valid values:

  • true

  • false (default)

ProxyMode

String

No

No

The kube-proxy mode.

Valid values:

  • iptables (default)

  • ipvs

MasterInstanceTypes

List

Yes

No

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

You must specify three ECS instance types. You can specify the same ECS instance types.

For more information, see Overview of instance families.

SnatEntry

Boolean

No

No

Specifies whether to configure SNAT rules for the virtual private cloud (VPC).

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

  • Valid values when the VPC cannot access the Internet:

    • true: configures SNAT rules for the VPC. In this case, the VPC can access the Internet.

    • false: does not configure SNAT rules for the VPC. In this case, the VPC cannot access the Internet.

WorkerSystemDiskCategory

String

No

No

The system disk category of the worker nodes.

Valid values:

  • cloud_efficiency (default): ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: Enterprise SSD (ESSD)

WorkerVSwitchIds

List

Yes

No

The vSwitch IDs of the worker nodes.

You can specify up to five vSwitch IDs.

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

Tags

List

No

Yes

The tags of the cluster.

You can add up to 20 tags.

For more information, see Tags properties.

PodVswitchIds

List

No

No

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

You must specify this property when you install the Terway component in the cluster.

CpuPolicy

String

No

No

The CPU policy.

This property takes effect only for clusters whose Kubernetes version is 1.12.6 or later. Valid values:

  • static

  • none (default)

WorkerInstanceTypes

List

No

No

The ECS instance types of the worker nodes.

For more information, see Overview of instance families.

WorkerDataDisks

List

No

No

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 when you attach data disks to worker nodes.

For more information, see WorkerDataDisks properties.

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.

ContainerCidr

String

No

No

The pod CIDR block.

You must specify this property when you create a cluster in which the Flannel component is used. The pod CIDR block must be one of the following VPC CIDR blocks or their subnets:

  • 10.0.X.X/8

  • 172.16-31.0.0/12-16

  • 192.168.XX.XX/16

The pod CIDR block cannot overlap with the VPC CIDR block and the CIDR blocks of existing clusters in the VPC. You cannot change the pod CIDR block after the cluster is created.

For more information, see Plan the network of an ACK cluster.

SecurityHardeningOs

Boolean

No

No

Specifies whether to enable security hardening for Alibaba Cloud Linux.

Valid values:

  • true

  • false

Default value: false.

NumOfNodes

Number

No

No

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

Default value: 120.

Unit: GiB.

NodePortRange

String

No

No

The port range of the nodes.

The range consists of two values from 30000 to 65535. Separate the two values with a hyphen (-).

Default range: 30000-65535.

SshFlags

Boolean

No

No

Specifies whether to enable SSH logon over the Internet.

Valid values:

  • true

  • false (default)

Taint

List

No

No

The taints that you want to add to nodes for scheduling of pods.

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

MasterDataDisk

Boolean

No

No

Specifies whether to attach data disks to master nodes.

Valid values:

  • true

  • false (default)

MasterSystemDiskCategory

String

No

No

The system disk category of the master nodes.

Valid values:

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

WorkerDataDisk

Boolean

No

No

Specifies whether to attach data disks to worker nodes.

Valid values:

  • true

  • false (default)

Addons

List

No

No

The components that you want to install in the cluster.

  • Network component:

    The Flannel and Terway components are supported. You must use one of the components when you create the cluster.

    • Value format when you use the Flannel component: [{"Name":"flannel","Config":""}].

    • Value format when you use the Terway component: [{"Name": "terway-eniip","Config": ""}].

  • Storage component:

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

    • Value format when you use the CSI component: [{"Name":"csi-plugin","Config": ""},{"Name": "csi-provisioner","Config": ""}].

    • Value format when you use the FlexVolume component: [{"Name": "flexvolume","Config": ""}].

  • (Optional) Simple Log Service (SLS) component:

    Note

    If you do not activate SLS, you cannot use the cluster auditing feature.

    • Value format when you use an existing SLS project: [{"Name": "logtail-ds","Config": "{\"IngressDashboardEnabled\":\"true\",\"sls_project_name\":\"your_sls_project_name\"}"}].

    • Value format when you create an SLS project: [{"Name": "logtail-ds","Config": "{\"IngressDashboardEnabled\":\"true\"}"}].

  • (Optional) Ingress component:

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

    • Value format when you install the nginx-ingress-controller component and enable Internet access: [{"Name":"nginx-ingress-controller","Config":"{\"IngressSlbNetworkType\":\"internet\"}"}].

    • Value format when you do not install the nginx-ingress-controller component: [{"Name": "nginx-ingress-controller","Config": "","Disabled": true}].

  • (Optional) Event center:

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

    Value format when you enable the event center feature: [{"Name":"ack-node-problem-detector","Config":"{\"sls_project_name\":\"your_sls_project_name\"}"}].

For more information, see Addons properties.

DisableRollback

Boolean

No

No

Specifies whether to disable rollback for resources if the cluster fails to be created.

Valid values:

  • true (default)

  • false

    Note

    If you set this property to false, the resources that are generated during the cluster creation are released when the cluster fails to be created. We recommend that you set this property to true.

ServiceCidr

String

No

No

The Service CIDR block.

The Service CIDR block cannot overlap with the VPC CIDR block or container CIDR block.

If you use the VPC that is automatically created by the system, 172.19.0.0/20 is used as the Service CIDR block by default.

KubernetesVersion

String

No

Yes

The Kubernetes version of the cluster. ACK supports the same Kubernetes versions as 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.

SecurityGroupId

String

No

No

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

None.

KeyPair

String

No

No

The name of the key pair.

You can specify KeyPair or LoginPassword.

MasterVSwitchIds

List

Yes

No

The vSwitch IDs of the master nodes.

You must specify three vSwitch IDs. You can specify the same vSwitch IDs. We recommend that you specify three different vSwitch IDs to ensure the high availability of the cluster.

EndpointPublicAccess

Boolean

No

No

Specifies whether to enable access to the API server of the cluster over the Internet.

Valid values:

  • true: enables access to the API server of the cluster over the Internet.

  • false (default): enables access to the API server of the cluster over the VPC.

MasterSystemDiskSize

Number

No

No

The system disk size of the master nodes.

Default value: 120.

Unit: GiB.

MasterDataDisks

List

No

No

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

This property takes effect only when you attach data disks to master nodes.

For more information, see MasterDataDisks properties.

MasterCount

Number

No

No

The number of master nodes.

Valid values:

  • 3 (default)

  • 5

TimeoutMins

Number

No

No

The timeout period for creating the cluster.

Default value: 60.

Unit: minutes.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

AutoRenewPeriod

Number

No

No

The auto-renewal period.

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

  • Valid values when PeriodUnit is set to Week: 1 to 3.

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

Default value: 1.

MasterSystemDiskSnapshotPolicyId

String

No

No

The ID of the policy that you want to use to back up the data disks of master nodes.

None.

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: If you set this property to true, the container and image data of the existing ECS instance is stored 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): If you set this property to false, the container and image data of the existing ECS instance is not stored on the data disk.

WorkerSystemDiskSnapshotPolicyId

String

No

No

The ID of the policy that you want to use to back up the data disks of worker nodes.

None.

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

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

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 by calling specific ACK API operations.

Valid values:

  • true

  • false (default)

OsType

String

No

No

The OS type.

Valid values:

  • Windows

  • Linux (default)

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.

This property takes effect when ChargeType is set to PrePaid.

Valid values:

  • true (default)

  • false

ChargeType

String

No

No

The billing method.

Valid values:

  • PrePaid: subscription

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

NodeCidrMask

String

No

No

The maximum number of CIDR blocks that can be assigned to the nodes.

The value of this property varies based on the pod CIDR block. This property takes effect only when you use the Flannel component in the cluster.

Default value: 25.

UserData

String

No

No

The user data that you specify 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.

UserCa

String

No

No

The certificate authority (CA) certificate of the cluster.

You can specify a CA certificate for the cluster to ensure secure data transmission between servers and clients.

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 a cluster, you must create an advanced security group.

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

Period

Number

No

No

The subscription duration of the cluster.

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

  • Valid values when PeriodUnit is set to Week: 1 to 4.

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

Default value: 1.

MasterSystemDiskPerformanceLevel

String

No

No

The ESSD performance level (PL) of the master nodes.

Valid values:

  • PL0

  • PL1

  • PL2

  • PL3

SocEnabled

Boolean

No

No

Specifies whether to enable reinforcement based on classified protection.

Valid values:

  • true

  • false (default)

MasterZoneIds

List

No

No

The information about the zones to which the vSwitches of master nodes belong.

None.

WorkerZoneIds

List

No

No

The information about the zones to which the vSwitches of worker nodes belong.

None.

TimeZone

String

No

No

The time zone of the cluster.

None.

Platform

String

No

No

The OS distribution.

Valid values:

  • CentOS (default)

  • AliyunLinux

  • QbootAliyunLinux

  • Qboot

  • Windows

  • WindowsCore

PeriodUnit

String

No

No

The unit of the subscription duration of the cluster.

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

  • Week

  • Month (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 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 digit.

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

DeleteOptions

List

No

Yes

The options for deleting or retaining resources associated with the cluster.

For more information, see DeleteOptions properties.

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 you want to use for 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 properties.

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 and use an advanced 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 you want to attach 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.

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

  • Valid values of Period when PeriodUnit is set to Month: 1, 2, 3, 6, and 12. Default value: 1.

InternetChargeType

String

No

No

The metering method of the public IP address.

Valid values:

  • PayByBandwidth: pay-by-bandwidth

  • PayByTraffic: pay-by-data-transfer

KeyPair

String

No

No

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

You can specify KeyPair or LoginPassword.

SystemDiskPerformanceLevel

String

No

No

The system disk PL of the 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 the system 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 nodes.

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.

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

  • Set the value of PeriodUnit to Month.

LoginPassword

String

No

No

The password for SSH logons.

You can specify KeyPair or LoginPassword.

The password must be 8 to 30 characters in length, and must contain at least 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 system disk size of the nodes.

Unit: GiB.

Valid values: 40 to 500.

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

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 data disks.

Valid values:

  • true

  • false (default)

Size

Integer

No

No

The data disk size.

Unit: GiB.

Valid values: 40 to 32768.

Default value: 120.

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

PerformanceLevel

String

No

No

The data disk PL of the nodes.

This property takes effect only for ESSDs. The PL of a 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 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 digit.

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

Taints

List

No

No

The configurations of 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.

Valid values:

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

None.

NodePoolInfo syntax

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

NodePoolInfo properties

Property

Type

Required

Editable

Description

Constraint

Name

String

Yes

No

The name of the node pool.

None.

Type

String

No

No

The type of the node pool.

Valid values:

  • edge

  • ess

ResourceGroupId

String

No

Yes

The resource group to which the node pool belongs.

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://.

MasterDataDisks syntax

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

MasterDataDisks properties

Property

Type

Required

Editable

Description

Constraint

Category

String

Yes

No

The data disk category of the master node.

Valid values:

  • cloud: basic disk

  • cloud_ssd: standard SSD

  • cloud_efficiency (default): ultra disk

  • cloud_essd: ESSD

Size

Number

Yes

No

The data disk size of the master node.

Valid values: 40 to 32768.

Unit: GiB.

WorkerDataDisks syntax

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

WorkerDataDisks properties

Property

Type

Required

Editable

Description

Constraint

Category

String

Yes

No

The data disk category of the worker node.

Valid values:

  • cloud: basic disk

  • cloud_ssd: standard SSD

  • cloud_efficiency (default): ultra disk

  • cloud_essd: ESSD

Size

Number

Yes

No

The data disk size.

Valid values: 40 to 32768.

Unit: GiB.

Addons syntax

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

Addons properties

Property

Type

Required

Editable

Description

Constraint

Disabled

Boolean

No

No

Specifies whether to disable default installation.

Valid values:

  • true

  • false

Config

String

No

No

The configurations of the component.

None.

Name

String

Yes

No

The component name.

None.

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.

  • Valid value when Name is set to containerd: 1.4.4.

  • Valid value when Name is set to docker: 19.03.5.

  • Valid value when Name is set to Sandboxed-Container.runv: 3.4.1.

DeleteOptions syntax

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

DeleteOptions properties

Property

Type

Required

Editable

Description

Constraint

DeleteMode

String

No

Yes

The deletion policy for 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: SLS projects used by the cluster logging feature. By default, the SLS projects are retained.

  • SLS_ControlPlane: SLS projects used by the control plane logs of ACK managed clusters. By default, the SLS projects are retained.

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

Return values

Fn::GetAtt

  • ClusterId: the cluster ID.

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

  • WorkerRamRoleName: the name of the Resource Access Management (RAM) role for the worker nodes.

  • ScalingGroupId: the ID of the scaling group.

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

  • Nodes: the nodes in the cluster.

  • ScalingRuleId: the ID of the scaling rule.

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

  • ScalingConfigurationId: the ID of the scaling configuration.

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

  • IngressSLBId: the ID of the SLB Ingress.

Examples

YAML

ROSTemplateFormatVersion: '2015-09-01'
Description: Test Create KubernetesCluster
Parameters:
  SystemDiskCategory:
    Type: String
    Description: Category of system disk. Default is cloud_efficiency. support cloud|cloud_efficiency|cloud_ssd|cloud_essd|ephemeral_ssd.Old instances will not be changed.
    AllowedValues:
      - cloud
      - cloud_efficiency
      - cloud_ssd
      - cloud_essd
      - ephemeral_ssd
    Default: cloud_essd
  LoginPassword:
    Type: String
    Default: Text****
Resources:
  Vpc:
    Type: ALIYUN::ECS::VPC
    Properties:
      VpcName: mytest
      CidrBlock: 192.168.XX.XX/16
  VSwitch1:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      VSwitchName: mytest
      VpcId:
        Ref: Vpc
      ZoneId:
        Fn::Select:
          - '0'
          - Fn::GetAZs:
              Ref: ALIYUN::Region
      CidrBlock: 192.168.XX.XX/24
  VSwitch2:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      VSwitchName: mytest
      VpcId:
        Ref: Vpc
      ZoneId:
        Fn::Select:
          - '0'
          - Fn::GetAZs:
              Ref: ALIYUN::Region
      CidrBlock: 192.168.XX.XX/24
  VSwitch3:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      VSwitchName: mytest
      VpcId:
        Ref: Vpc
      ZoneId:
        Fn::Select:
          - '0'
          - Fn::GetAZs:
              Ref: ALIYUN::Region
      CidrBlock: 192.168.XX.XX/24
  KubernetesCluster:
    Type: ALIYUN::CS::KubernetesCluster
    Properties:
      MasterInstanceTypes:
        - ecs.g6e.large
        - ecs.g6e.large
        - ecs.g6e.large
      MasterSystemDiskCategory:
        Ref: SystemDiskCategory
      WorkerSystemDiskCategory:
        Ref: SystemDiskCategory
      WorkerVSwitchIds:
        - Ref: VSwitch1
      VpcId:
        Ref: Vpc
      WorkerInstanceTypes:
        - ecs.g6e.large
      Name: TestKubernetesCluster
      MasterVSwitchIds:
        - Ref: VSwitch1
        - Ref: VSwitch2
        - Ref: VSwitch3
      LoginPassword:
        Ref: LoginPassword
Outputs:
  ClusterId:
    Value:
      Fn::GetAtt:
        - KubernetesCluster
        - ClusterId
  TaskId:
    Value:
      Fn::GetAtt:
        - KubernetesCluster
        - TaskId

JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Test Create KubernetesCluster",
  "Parameters": {
    "SystemDiskCategory": {
      "Type": "String",
      "Description": "Category of system disk. Default is cloud_efficiency. support cloud|cloud_efficiency|cloud_ssd|cloud_essd|ephemeral_ssd.Old instances will not be changed.",
      "AllowedValues": [
        "cloud",
        "cloud_efficiency",
        "cloud_ssd",
        "cloud_essd",
        "ephemeral_ssd"
      ],
      "Default": "cloud_essd"
    },
    "LoginPassword": {
      "Type": "String",
      "Default": "Text****"
    }
  },
  "Resources": {
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "VpcName": "mytest",
        "CidrBlock": "192.168.XX.XX/16"
      }
    },
    "VSwitch1": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VSwitchName": "mytest",
        "VpcId": {
          "Ref": "Vpc"
        },
        "ZoneId": {
          "Fn::Select": [
            "0",
            {
              "Fn::GetAZs": {
                "Ref": "ALIYUN::Region"
              }
            }
          ]
        },
        "CidrBlock": "192.168.XX.XX/24"
      }
    },
    "VSwitch2": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VSwitchName": "mytest",
        "VpcId": {
          "Ref": "Vpc"
        },
        "ZoneId": {
          "Fn::Select": [
            "0",
            {
              "Fn::GetAZs": {
                "Ref": "ALIYUN::Region"
              }
            }
          ]
        },
        "CidrBlock": "192.168.XX.XX/24"
      }
    },
    "VSwitch3": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VSwitchName": "mytest",
        "VpcId": {
          "Ref": "Vpc"
        },
        "ZoneId": {
          "Fn::Select": [
            "0",
            {
              "Fn::GetAZs": {
                "Ref": "ALIYUN::Region"
              }
            }
          ]
        },
        "CidrBlock": "192.168.XX.XX/24"
      }
    },
    "KubernetesCluster": {
      "Type": "ALIYUN::CS::KubernetesCluster",
      "Properties": {
        "MasterInstanceTypes": [
          "ecs.g6e.large",
          "ecs.g6e.large",
          "ecs.g6e.large"
        ],
        "MasterSystemDiskCategory": {
          "Ref": "SystemDiskCategory"
        },
        "WorkerSystemDiskCategory": {
          "Ref": "SystemDiskCategory"
        },
        "WorkerVSwitchIds": [
          {
            "Ref": "VSwitch1"
          }
        ],
        "VpcId": {
          "Ref": "Vpc"
        },
        "WorkerInstanceTypes": [
          "ecs.g6e.large"
        ],
        "Name": "TestKubernetesCluster",
        "MasterVSwitchIds": [
          {
            "Ref": "VSwitch1"
          },
          {
            "Ref": "VSwitch2"
          },
          {
            "Ref": "VSwitch3"
          }
        ],
        "LoginPassword": {
          "Ref": "LoginPassword"
        }
      }
    }
  },
  "Outputs": {
    "ClusterId": {
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ClusterId"
        ]
      }
    },
    "TaskId": {
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "TaskId"
        ]
      }
    }
  }
}