ALIYUN::CS::ASKCluster is used to create an ACK Serverless cluster of Container Service for Kubernetes (ACK).
Syntax
{
"Type": "ALIYUN::CS::ASKCluster",
"Properties": {
"KubernetesVersion": String,
"EndpointPublicAccess": Boolean,
"ZoneId": String,
"ResourceGroupId": String,
"VSwitchIds": List,
"SecurityGroupId": String,
"Addons": List,
"DeletionProtection": Boolean,
"ClusterSpec": String,
"Name": String,
"TimeZone": String,
"ServiceDiscoveryTypes": List,
"VpcId": String,
"ServiceCidr": String,
"SnatEntry": Boolean,
"Tags": List,
"PrivateZone": Boolean,
"DeleteOptions": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
KubernetesVersion | String | No | Yes | The version of the cluster. | None. |
EndpointPublicAccess | Boolean | No | No | Specifies whether to enable Internet access to the API server of the cluster. | Valid values:
|
ZoneId | String | No | No | The ID of the zone that belongs to the region of the cluster. | If you do not specify |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the cluster belongs. | None. |
VSwitchIds | List | No | No | The IDs of the vSwitches to which the nodes in the cluster are connected. | You can specify up to three vSwitches. Note You must specify this property when you create an ACK managed cluster that does not contain nodes. |
SecurityGroupId | String | No | No | The ID of the security group to which the Elastic Compute Service (ECS) instances in the cluster belong. | None. |
Addons | List | No | No | The components in the cluster. | None. |
DeletionProtection | Boolean | No | No | Specifies whether to enable deletion protection to prevent the cluster from being accidentally deleted in the ACK console or by calling specific ACK API operations. | Valid values:
|
ClusterSpec | String | No | No | The type of the ACK managed cluster. | Valid values:
Note If you leave this property empty, an ACK standard cluster is created. For more information, see Overview of ACK Pro clusters. |
Name | String | Yes | No | The cluster name. | The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-). |
TimeZone | String | No | No | The time zone of the cluster. | None. |
ServiceDiscoveryTypes | List | No | No | The methods for implementing service discovery in the cluster. | Valid values:
|
VpcId | String | No | No | The VPC of the cluster. | None. |
ServiceCidr | String | No | No | The Service CIDR block. | Valid values: Note By default, |
SnatEntry | Boolean | No | No | Specifies whether to configure SNAT rules for the VPC. | Valid values:
Note If you set this property to false when you create the cluster, you can manually enable Internet access to meet your business requirements after you create the cluster. For more information, see Enable an existing ACK cluster to access the Internet. |
Tags | List | No | Yes | The labels that you want to add to the nodes. | You must add labels based on the following rules:
|
PrivateZone | Boolean | No | No | Specifies whether to activate Alibaba Cloud DNS PrivateZone. | Valid values:
|
Addons syntax
"Addons": [
{
"Config": String,
"Disabled": Boolean,
"Name": String
}
]
Addons properties
Property | Type | Required | Editable | Description | Constraint |
Config | String | No | No | The configurations of the component. | None. |
Disabled | Boolean | No | No | Specifies whether to disable default installation. | In addition to the required components, specific optional components, such as Simple Log Service (SLS) components, are also installed by default when you create a cluster. You can specify this property to disable the default installation of optional components. You can install the optional component in the ACK console or by calling specific ACK API operations after the cluster is created. Valid values:
|
Name | String | Yes | No | The component name. | None. |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Value | String | No | No | The label key. | None. |
Key | String | Yes | No | The label value. | None. |
DeleteOptions syntax
"DeleteOptions": [
{
"DeleteMode": String,
"ResourceType": String
}
]
DeleteOptions properties
Property | Type | Required | Editable | Description | Constraint |
DeleteMode | String | No | Yes | The policy that specifies whether to delete the specified type of resources. | Valid values:
|
ResourceType | String | No | Yes | The type of the resources. | Valid values:
|
Return values
Fn::GetAtt
TaskId: the task ID.
ClusterId: the cluster ID.
APIServerSLBId: the ID of the SLB instance that is associated with the API server.
ScalingGroupId: the ID of the scaling group.
ScalingRuleId: the ID of the scaling rule.
DefaultUserKubeConfig: the default kubeconfig file of the cluster credentials.
WorkerRamRoleName: the name of the Resource Access Management (RAM) role for the worker nodes.
ScalingConfigurationId: the ID of the scaling configuration.
PrivateUserKubConfig: the private kubeconfig file of the cluster credentials.
Nodes: the nodes in the cluster.
IngressSLBId: the ID of the SLB Ingress.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Description: Test Create ASKCluster
Parameters: {}
Resources:
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
VSwitchName: mytest
VpcId:
Ref: Vpc
CidrBlock: 192.168.1.0/24
ZoneId:
Fn::Select:
- '0'
- Fn::GetAZs:
Ref: ALIYUN::Region
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
VpcName: mytest
CidrBlock: 192.168.0.0/16
ASKCluster:
Type: ALIYUN::CS::ASKCluster
Properties:
VpcId:
Ref: Vpc
ClusterSpec: ack.pro.small
Name: mytest
VSwitchIds:
- Ref: VSwitch
Outputs:
ClusterId:
Value:
Fn::GetAtt:
- ASKCluster
- ClusterId
TaskId:
Value:
Fn::GetAtt:
- ASKCluster
- TaskId
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test Create ASKCluster",
"Parameters": {},
"Resources": {
"VSwitch": {
"Type": "ALIYUN::ECS::VSwitch",
"Properties": {
"VSwitchName": "mytest",
"VpcId": {
"Ref": "Vpc"
},
"CidrBlock": "192.168.1.0/24",
"ZoneId": {
"Fn::Select": [
"0",
{
"Fn::GetAZs": {
"Ref": "ALIYUN::Region"
}
}
]
}
}
},
"Vpc": {
"Type": "ALIYUN::ECS::VPC",
"Properties": {
"VpcName": "mytest",
"CidrBlock": "192.168.0.0/16"
}
},
"ASKCluster": {
"Type": "ALIYUN::CS::ASKCluster",
"Properties": {
"VpcId": {
"Ref": "Vpc"
},
"ClusterSpec": "ack.pro.small",
"Name": "mytest",
"VSwitchIds": [
{
"Ref": "VSwitch"
}
]
}
}
},
"Outputs": {
"ClusterId": {
"Value": {
"Fn::GetAtt": [
"ASKCluster",
"ClusterId"
]
}
},
"TaskId": {
"Value": {
"Fn::GetAtt": [
"ASKCluster",
"TaskId"
]
}
}
}
}