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,
    "CisEnabled": Boolean,
    "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
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
RuntimeMapNoNoThe container runtime. The Runtime property consists of the following fields:
  • name: the name of the container runtime.
  • version: the version of the container runtime.

Sample value:

{"name": "docker", "version": "19.03.5"}
Note For information about how to select a container runtime, see Comparison of Docker, containerd, and Sandboxed-Container. For information about the Runtime property, see Runtime properties.
CloudMonitorFlagsBooleanNoNoSpecifies whether to install the CloudMonitor agent. Default value: false. Valid values:
  • true: installs the CloudMonitor agent.
  • false: does not install the CloudMonitor agent.
ProxyModeStringNoNoThe kube-proxy mode. Default value: iptables. Valid values:
  • iptables
  • ipvs
MasterInstanceTypesListYesNoThe Elastic Compute Service (ECS) instance types of 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.

SnatEntryBooleanNoNoSpecifies whether to configure SNAT rules for the virtual private cloud (VPC). Valid values:
  • If the VPC can access the Internet, set this property to false.
  • Valid values if the VPC cannot access the Internet:
    • true: configures SNAT rules to allow the VPC to access the Internet.
    • false: does not configure SNAT rules.
WorkerSystemDiskCategoryStringNoNoThe category of the system disks for worker nodes. Default value: cloud_efficiency. Valid values:
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: enhanced SSD (ESSD).
WorkerVSwitchIdsListYesNoThe vSwitch IDs of worker nodes. You can specify up to five vSwitch IDs.
VpcIdStringYesNoThe ID of the VPC. If you do not specify this property, the system creates a VPC whose CIDR block is 192.168.0.0/16.

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

TagsListNoYesThe tags of the cluster. You can specify up to 20 tags.

For more information, see Tags properties.

PodVswitchIdsListNoNoThe 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 If you install the Terway component in the cluster, you must specify this property.
CpuPolicyStringNoNoThe CPU policy. This property takes effect only for clusters whose Kubernetes version is 1.12.6 or later. Default value: none. Valid values:
  • static
  • none
WorkerInstanceTypesListNoNoThe ECS instance types of worker nodes. For more information, see Overview of instance families.
WorkerDataDisksListNoNoThe 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.

LoginPasswordStringNoNoThe password for SSH logon. 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 only one of the LoginPassword and KeyPair properties.
ContainerCidrStringNoNoThe CIDR block of the pod. If you install the Flannel component in the cluster, this property is required. The CIDR block must be one of the following CIDR blocks or their subnets:
  • 10.0.X.X/8
  • 172.16-31.0.0/12-16
  • 192.168.XX.XX/16
The CIDR block of the pod cannot overlap with the CIDR block of the VPC in which you want to deploy the cluster or the CIDR blocks of existing clusters in the VPC. You cannot modify the CIDR block of the pod after you create the cluster.

For more information, see Plan CIDR blocks for an ACK cluster.

NumOfNodesNumberNoNoThe number of worker nodes. Valid values: 0 to 300.

Default value: 3.

NameStringYesNoThe name of the cluster. The name must be 1 to 63 characters in length, and can contain letters, digits, and hyphens (-).
WorkerSystemDiskSizeNumberNoNoThe system disk size of worker nodes. Default value: 120.

Unit: GiB.

NodePortRangeStringNoNoThe port range of a node. The range contains two values from 30000 to 65535. Separate the two values with a hyphen (-).

Default range: 30000 to 65535.

SshFlagsBooleanNoNoSpecifies whether to enable SSH logon over the Internet. Default value: false. Valid values:
  • true
  • false
TaintListNoNoThe 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.
MasterDataDiskBooleanNoNoSpecifies whether to attach data disks to master nodes. Default value: false. Valid values:
  • true
  • false
MasterSystemDiskCategoryStringNoNoThe category of the system disks for master nodes. Valid values:
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD.
WorkerDataDiskBooleanNoNoSpecifies whether to attach data disks to worker nodes. Default value: false. Valid values:
  • true
  • false
AddonsListNoNoThe components that you want to install in 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) Log Service components
  • You can use an existing Log Service project or create a Log Service project.
    Note If you do not activate Log Service, you cannot use the cluster auditing feature.
    • If you want to use an existing 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 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 in ACK dedicated clusters.

    • If you install nginx-ingress-controller and enable Internet access, specify the value in the [{"Name":"nginx-ingress-controller","Config":"{\"IngressSlbNetworkType\":\"internet\"}"}] format.
    • If you do not install nginx-ingress-controller, specify the value in the [{"Name": "nginx-ingress-controller","Config": "","Disabled": true}] format.
  • (Optional) Event centers

    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 free of charge within 90 days. For more information, see Create and use an event center.

    If you 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.
DisableRollbackBooleanNoNoSpecifies whether to roll back the resources when the cluster fails to be created. Default value: true. Valid values:
  • true
  • false
    Note If you set this property to false, the resources that are generated to create the cluster are released. We recommend that you set this property to true.
ServiceCidrStringNoNoThe 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 172.19.0.0/20 CIDR block is automatically used.

KubernetesVersionStringNoNoThe 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 that are supported by ACK, see Overview of Kubernetes versions supported by ACK.
SecurityGroupIdStringNoNoThe ID of the security group with which the ECS instances in the cluster are associated. None.
KeyPairStringNoNoThe name of the key pair. You can specify only one of the LoginPassword and KeyPair properties.
MasterVSwitchIdsListYesNoThe vSwitch IDs of 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.
EndpointPublicAccessBooleanNoNoSpecifies whether to allow the cluster to access the API server over the Internet. Default value: false. Valid values:
  • true: allows the cluster to access the API server over the Internet.
  • false: allows the cluster to access the API server only over the VPC.
MasterSystemDiskSizeNumberNoNoThe system disk size of master nodes. Default value: 120.

Unit: GiB.

MasterDataDisksListNoNoThe 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 if you attach data disks to master nodes.

For more information, see MasterDataDisks properties.

MasterCountNumberNoNoThe number of master nodes. Default value: 3. Valid values:
  • 3
  • 5
TimeoutMinsNumberNoNoThe timeout period during which you can create the cluster. Default value: 60.

Unit: minutes.

ResourceGroupIdStringNoYesThe ID of the resource group. None.
CisEnabledBooleanNoNoSpecifies whether to enable Center for Internet Security (CIS) reinforcement. Default value: false. Valid values:
  • true
  • false
AutoRenewPeriodNumberNoNoThe auto-renewal period. This property takes effect only if 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.

MasterSystemDiskSnapshotPolicyIdStringNoNoThe ID of the policy that is used to back up the data disks that are used by master nodes. None.
FormatDiskBooleanNoNoSpecifies whether to attach a data disk to a node that is created based on an existing ECS instance.Default value: false. 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: does not store the container and image data of the existing ECS instance on the data disk.
WorkerSystemDiskSnapshotPolicyIdStringNoNoThe ID of the policy that is used to back up the data disks that are used by worker nodes. None.
KeepInstanceNameBooleanNoNoSpecifies whether to retain the name of an existing ECS instance that is used in the cluster. Default value: true. Valid values:
  • true: retains the name of the existing ECS instance.
  • false: does not retain the name of the existing ECS instance. The system assigns a new name to the existing ECS instance.
DeletionProtectionBooleanNoNoSpecifies whether to enable deletion protection. After you enable deletion protection, you cannot delete the cluster in the ACK console or by calling specific ACK API operations.

Default value: false. Valid values:

  • true
  • false
OsTypeStringNoNoThe type of the OS. Default value: Linux. Valid values:
  • Windows
  • Linux
LoadBalancerSpecStringNoNoThe 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
AutoRenewBooleanNoNoSpecifies whether to enable auto-renewal for the cluster. This property takes effect only if you set the ChargeType property to PrePaid.

Default value: true. Valid values:

  • true
  • false
ChargeTypeStringNoNoThe billing method of the cluster. Default value: PostPaid. Valid values:
  • PrePaid: subscription.
  • PostPaid: pay-as-you-go.
NodeCidrMaskStringNoNoThe 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 in the cluster.

Default value: 25.

UserDataStringNoNoThe user data that you want to pass when you create ECS instances. The data must be less than 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.
UserCaStringNoNoThe certificate authority (CA) certificate for the cluster. You can specify a CA certificate for the cluster to ensure secure data transmission between servers and clients.
IsEnterpriseSecurityGroupBooleanNoNoSpecifies whether to create an advanced security group. This property takes effect only if you leave the SecurityGroupId property empty. Default value: false. 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: does not create an advanced security group.
PeriodNumberNoNoThe subscription duration of the cluster. This property is required only if 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.

MasterSystemDiskPerformanceLevelStringNoNoThe performance level (PL) of the ESSDs for master nodes. Valid values:
  • PL0
  • PL1
  • PL2
  • PL3
SocEnabledBooleanNoNoSpecifies whether to enable reinforcement based on classified protection. Default value: false. Valid values:
  • true
  • false
MasterZoneIdsListNoNoThe information about the zones of the vSwitches that are used by master nodes. None.
WorkerZoneIdsListNoNoThe information about the zones of the vSwitches that are used by worker nodes. None.
TimeZoneStringNoNoThe time zone of the cluster. None.
PlatformStringNoNoThe distribution of the OS. Default value: CentOS. Valid values:
  • CentOS
  • AliyunLinux
  • QbootAliyunLinux
  • Qboot
  • Windows
  • WindowsCore
PeriodUnitStringNoNoThe unit of the subscription duration. This property takes effect only if you set the ChargeType property to PrePaid. Default value: Month. Valid values:
  • Week
  • Month
NodePoolsListNoNoThe information about the node pools. For more information, see NodePools properties.
NodeNameModeStringNoNoThe 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.

NodePools syntax

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

NodePools properties

PropertyTypeRequiredEditableDescriptionConstraint
ScalingGroupMapYesNoThe configuration of the scaling group that is used by the node pool. For more information, see ScalingGroup properties.
KubernetesConfigMapNoNoThe configuration of the cluster. For more information, see KubernetesConfig properties.
NodePoolInfoMapNoNoThe configuration of the node pool. For more information, see NodePoolInfo property.
CountIntegerNoNoThe 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

PropertyTypeRequiredEditableDescriptionConstraint
RdsInstancesListNoNoThe IDs of ApsaraDB RDS instances. None.
IsEnterpriseSecurityGroupBooleanNoNoSpecifies whether to automatically create an advanced security group. Valid values:
  • true: creates and uses an advanced security group.
  • false: does not create and use an advanced security group.
VSwitchIdsListYesNoThe IDs of vSwitches. None.
InternetMaxBandwidthOutIntegerNoNoThe maximum outbound bandwidth of the public IP address that is assigned to a node. Unit: Mbit/s.

Valid values: 1 to 100.

DataDisksListNoNoThe configurations of the data disks that you want to attach to the nodes in the node pool. For more information, see DataDisks properties.
PeriodIntegerNoNoThe subscription duration of the nodes in the node pool. This property is required only if you set the InternetChargeType property to PrePaid.

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

Default value: 1.
InternetChargeTypeStringNoNoThe billing method of the nodes in the node pool. Default value: PostPaid. Valid values:
  • PrePaid: subscription
  • PostPaid: pay-as-you-go
KeyPairStringNoNoThe name of the key pair that is used for password-free logon. You can specify only one of the LoginPassword and KeyPair properties.
SystemDiskPerformanceLevelStringNoNoThe PL of the system disk of o node. This property takes effect only for ESSDs.
ImageIdStringNoNoThe ID of the custom image. By default, the image that is provided by ACK is used.
PlatformStringNoNoThe OS distribution that you want to use. Default value: AliyunLinux. Valid values:
  • CentOS
  • AliyunLinux
  • Windows
  • WindowsCore
InstanceTypesListYesNoThe instance types. None.
SystemDiskCategoryStringNoNoThe system disk category of the node. Default value: cloud_efficiency. Valid values:
  • cloud_efficiency: ultra disk
  • cloud_ssd: SSD
  • cloud_essd: ESSD
PeriodUnitStringNoNoThe unit of the subscription duration of the nodes in the node pool. This property is required if you set the InternetChargeType property to PrePaid.

Set the value to Month.

LoginPasswordStringNoNoThe password for SSH logon. You can specify only one of the LoginPassword and KeyPair properties.

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

InstanceChargeTypeStringNoNoThe billing method of the nodes in the node pool. Default value: PostPaid. Valid values:
  • PrePaid: subscription
  • PostPaid: pay-as-you-go
SystemDiskSizeIntegerYesNoThe size of the system disk for nodes. Unit: GiB.

Valid values: 40 to 500.

TagsListNoNoThe tags of the ECS instances. For more information, see Tags properties.
ZoneIdsListNoNoThe IDs of the zones. None.

DataDisks syntax

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

DataDisks properties

PropertyTypeRequiredEditableDescriptionConstraint
AutoSnapshotPolicyIdStringNoNoThe ID of the automatic snapshot policy. The system automatically backs up cloud disks based on the specified automatic snapshot policy.
EncryptedBooleanNoNoSpecifies whether to encrypt the data disks. Default value: false. Valid values:
  • true
  • false
SizeIntegerNoNoThe size of the data disk. Unit: GiB.

Valid values: 40 to 32768.

Default value: 120.
CategoryStringNoNoThe category of the data disk. Default value: cloud_efficiency. Valid values:
  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
PerformanceLevelStringNoNoThe PL of the data disk. 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

PropertyTypeRequiredEditableDescriptionConstraint
RuntimeStringYesNoThe container runtime. None.
RuntimeVersionStringYesNoThe version of the container runtime. None.
CpuPolicyStringNoNoThe CPU management policy. Valid values if 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: uses the default CPU affinity. This is the default value.
LabelsListNoNoThe labels that you want to add to the nodes. You can add labels to the nodes in the cluster.

For more information, see Labels properties.

NodeNameModeStringNoNoThe 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.
TaintsListNoNoThe configurations of the taints. For more information, see Taints properties.

Labels syntax

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

Labels properties

PropertyTypeRequiredEditableDescriptionConstraint
ValueStringYesNoThe value of the label. None.
KeyStringYesNoThe key of the label. None.

Taints syntax

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

Taints properties

PropertyTypeRequiredEditableDescriptionConstraint
ValueStringYesNoThe value of the taint. None.
EffectStringNoNoThe scheduling policy. Default value: NoSchedule. Valid values:
  • NoSchedule: Pods that do not tolerate the taint are not scheduled to the node that contains the 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 the taint to the node.
  • PreferNoSchedule: This is a preference or soft version of NoSchedule. This policy does not affect existing pods on the node.
KeyStringYesNoThe name of the taint. None.

NodePoolInfo syntax

"NodePoolInfo": {
  "Name": String
}

NodePoolInfo property

PropertyTypeRequiredEditableDescriptionConstraint
NameStringYesNoThe name of the node pool. None.

Tags syntax

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

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
KeyStringYesNoThe key of the tag. The tag key must be 1 to 64 characters in length and cannot start with aliyun, acs:, https://, or http://.
ValueStringYesNoThe value of the tag. The tag value must be 0 to 128 characters in length and cannot start with aliyun, acs:, http://, or https://.

MasterDataDisks syntax

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

MasterDataDisks properties

PropertyTypeRequiredEditableDescriptionConstraint
CategoryStringYesNoThe category of the data disks that you want to attach to master nodes. Default value: cloud_efficiency. Valid values:
  • cloud: basic disk
  • cloud_ssd: standard SSD
  • cloud_efficiency: ultra disk
  • cloud_essd: ESSD
SizeNumberYesNoThe data disk size of master nodes. Valid values: 40 to 32768.

Unit: GiB.

WorkerDataDisks syntax

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

WorkerDataDisks properties

PropertyTypeRequiredEditableDescriptionConstraint
CategoryStringYesNoThe data disk category of worker nodes. Default value: cloud_efficiency. Valid values:
  • cloud: basic disk
  • cloud_ssd: standard SSD
  • cloud_efficiency: ultra disk
  • cloud_essd: ESSD
SizeNumberYesNoThe size of the data disk. Valid values: 40 to 32768.

Unit: GiB.

Addons syntax

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

Addons properties

PropertyTypeRequiredEditableDescriptionConstraint
DisabledBooleanNoNoSpecifies whether to disable automatic installation of the component. Valid values:
  • true
  • false
ConfigStringNoNoThe configuration of the component. None.
NameStringYesNoThe name of the component. None.

Runtime syntax

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

Runtime properties

PropertyTypeRequiredEditableDescriptionConstraint
NameStringYesNoThe name of the container runtime. Default value: docker. Valid values:
  • containerd
  • docker
  • Sandboxed-Container.runv
VersionStringNoNoThe version of the container runtime.
  • Valid value if you set the Name property to containerd: 1.4.4.
  • Valid value if you set the Name property to docker: 19.03.5.
  • Valid value if you set the Name property to Sandboxed-Container.runv: 3.4.1.

Return values

Fn::GetAtt

  • ClusterId: the ID of the cluster.
  • TaskId: the ID of the task. 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 for the worker node.
  • ScalingGroupId: the ID of the scaling group.
  • DefaultUserKubeConfig: the default configurations of user credentials for the ACK cluster.
  • Nodes: the nodes in the cluster.
  • ScalingRuleId: the ID of the scaling rule.
  • PrivateUserKubConfig: the private configurations of user credentials for the ACK cluster.
  • ScalingConfigurationId: the ID of the scaling configuration.
  • APIServerSLBId: the ID of the SLB instance that is associated with the API server.

Examples

  • YAMLformat

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

    {
      "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"
            ]
          }
        }
      }
    }

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