Call CreateCluster with profile=Edge to configure network, runtime, and worker node settings.
Debugging
Request syntax
POST /clusters HTTP/1.1
Content-Type:application/json
{
"name" : "String",
"cluster_type" : "String",
"disable_rollback" : Boolean,
"timeout_mins" : Long,
"kubernetes_version" : "String",
"runtime" : {
"name" : "String",
"version" : "String"
},
"region_id" : "String",
"key_pair" : "String",
"login_password" : "String",
"num_of_nodes" : Long,
"profile" : "String",
"logging_type" : "String",
"snat_entry" : Boolean,
"vswitch_ids" : [ "String" ],
"worker_system_disk_category" : "String",
"worker_system_disk_size" : Long,
"container_cidr" : "String",
"cloud_monitor_flags" : Boolean,
"endpoint_public_access" : Boolean,
"service_cidr" : "String",
"addons" : [ {
"name" : "String",
"config" : "String",
"disabled" : Boolean
} ],
"tags" : [ {
"key" : "String",
"value" : "String"
} ],
"vpcid" : "String",
"worker_data_disks" : [ {
"category" : "String",
"size" : Long,
"encrypted" : "String",
"auto_snapshot_policy_id" : "String"
} ],
"deletion_protection" : Boolean,
"node_cidr_mask" : "String",
"worker_instance_types" : [ "String" ],
"worker_instance_charge_type" : "String",
"security_group_id" : "String",
"is_enterprise_security_group" : Boolean,
"rds_instances" : [ "String" ]
}
Request parameters
Table 1. Request body parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| name | String | Yes | demo-edge-cluster | The cluster name. 1–63 characters; can contain digits, letters, Chinese characters, and hyphens (-). Cannot start with a hyphen. |
| cluster_type | String | Yes | ManagedKubernetes | The cluster type. Set to ManagedKubernetes for ACK Edge clusters. |
| disable_rollback | Boolean | No | true | Deprecated. Specifies whether to roll back on cluster creation failure. Valid values: true (roll back) and false (do not roll back). Default value: false. |
| timeout_mins | Long | No | 60 | Deprecated. The timeout period for resource creation. Unit: minutes. Default value: 60. |
| kubernetes_version | String | No | 1.30.1-aliyun.1 | The Kubernetes version. Defaults to the latest version. ACK supports the same versions as open-source Kubernetes. The console offers the latest three versions; use API operations for earlier versions. See Support for Kubernetes versions. |
| runtime | Array of runtime | No | {"name": "containerd", "version": "1.6.20"} |
The container runtime. Supported runtimes: containerd and docker. Fields: name (runtime name) and version (runtime version). |
| region_id | String | Yes | cn-beijing | The region ID of the cluster. |
| key_pair | String | Yes | demo-key | Deprecated. The name of the key pair. Set this parameter or login_password. |
| login_password | String | Yes | HelloWorld123 | Deprecated. The SSH logon password. Set this parameter or key_pair. 8–30 characters; must include at least three of: uppercase letters, lowercase letters, digits, and special characters. |
| num_of_nodes | Long | Yes | 1 | Deprecated. The number of worker nodes. Valid values: 0 to 100. |
| profile | String | Yes | Edge | Identifies the cluster as an ACK Edge cluster. Default value: Edge. |
| logging_type | String | No | SLS | Specifies whether to enable Simple Log Service (SLS). Set to SLS to enable. Takes effect only for ACK Serverless clusters. |
| snat_entry | Boolean | No | true | Specifies whether to configure SNAT rules for the Virtual Private Cloud (VPC). Valid values: true (configure SNAT for Internet access) and false (no SNAT). Set to false if the VPC already has Internet access, or true if cluster applications need Internet access. Default value: false. |
| vswitch_ids | Array of String | Yes | vsw-2ze48rkq464rsdts1\*\*\*\* | The IDs of vSwitches. Specify one to three vSwitches. |
| worker_system_disk_category | String | Yes | cloud_efficiency | Deprecated. The system disk type for worker nodes. Valid values: cloud_efficiency (ultra disk) and cloud_ssd (standard SSD). Default value: cloud_ssd. |
| worker_system_disk_size | Long | Yes | 100 | Deprecated. The system disk size for worker nodes. Unit: GiB. Valid values: 40 to 500 (must be at least max{40, ImageSize}). Default value: 120. |
| container_cidr | String | No | 172.20.0.0 |
The pod CIDR block. Cannot overlap with the VPC CIDR block. Default: 172.16.0.0/16 if the VPC is auto-created.
Important
This parameter is required if the cluster uses Flannel as the network plug-in, and optional if the cluster uses Terway. |
| cloud_monitor_flags | Boolean | No | true | Deprecated. Specifies whether to install the CloudMonitor agent. Valid values: true (install) and false (skip). Default value: false. |
| endpoint_public_access | Boolean | No | true |
Specifies whether to enable Internet access for the API server. Valid values:
true
(enable) and
false
(disable; API server accessible only within the internal network). Default value:
true
.
Important
In ACK Edge clusters, edge nodes communicate with the control plane over the Internet. Enable Internet access for the API server when creating an ACK Edge cluster. |
| service_cidr | String | Yes | 172.21.0.0 | The Service CIDR block. Cannot overlap with the pod or VPC CIDR block. Default: 172.19.0.0/20 if the VPC is auto-created. |
| addons | Array of addon | No | \[{"name":"flannel","config":""},{"name":"logtail-ds-docker","config":""},{"name":"alibaba-log-controller","config":"{\"IngressDashboardEnabled\":\"false\"}"}\] |
The cluster add-ons. Fields: name (required), config (optional; leave blank if unused), and disabled (optional; disable auto-installation). Network plug-in (required): Flannel or Terway. Flannel: [{"name":"flannel","config":""}]. Terway: [{"name":"terway-eniip","config":""}]. Volume plug-in (optional): Container Storage Interface (CSI): [{"name":"csi-plugin","config":""},{"name":"csi-provisioner","config":""}].
Log Service add-on
(optional): Disabling SLS disables cluster auditing. Existing project: [{"name":"logtail-ds","config":"{\"IngressDashboardEnabled\":\"true\",\"sls_project_name\":\"your_sls_project_name\"}"}]. New project: [{"name":"logtail-ds","config":"{\"IngressDashboardEnabled\":\"true\"}"}]. Ingress controller (optional): Installed by default in ACK dedicated clusters. With Internet access: [{"name":"nginx-ingress-controller","config":"{\"IngressSlbNetworkType\":\"internet\"}"}]. Skip: [{"name":"nginx-ingress-controller","config":"","disabled":true}]. Event center (optional): Enabled by default. Configuration: [{"name":"ack-node-problem-detector","config":"{\"sls_project_name\":\"your_sls_project_name\"}"}]. See Create and use an event center.
|
| tags | Array of tag | No | \[{"key":"env","value":"prod"}\] | The labels to add to the cluster. key: the label key. value: the label value. |
| vpcid | String | Yes | vpc-2zeik9h3ahvv2zz95\*\*\*\* |
The VPC ID. Required for cluster creation.
Note
Leave both |
| worker_data_disks | Array of data_disk | No | — | Deprecated. The data disk configuration for worker nodes, including disk type and size. |
| deletion_protection | Boolean | No | true | Specifies whether to enable deletion protection. When enabled, the cluster cannot be deleted from the console or by API operations. Valid values: true (enable) and false (disable). Default value: false. |
| node_cidr_mask | String | No | 25 | The node CIDR mask size, which determines the maximum pod IP addresses per node. Takes effect only with the Flannel plug-in. Default value: 25. |
| worker_instance_types | Array of String | Yes | ecs.n4.large | Deprecated. The ECS instance types for worker nodes. Specify at least one type, listed in descending priority; the system falls back to the next type if unavailable. See Overview of instance families. |
| worker_instance_charge_type | String | Yes | PrePaid | Deprecated. The billing method of worker nodes. Valid values: PrePaid (subscription) and PostPaid (pay-as-you-go). Default value: PostPaid. |
| security_group_id | String | No | sg-bp1bdue0qc1g7k\*\*\*\* | The ID of an existing security group. Set this parameter or is_enterprise_security_group. Cluster nodes are automatically added to this security group. |
| is_enterprise_security_group | Boolean | No | true |
Specifies whether to create an advanced security group. Takes effect only when
security_group_id
is not set. Valid values:
true
(create) and
false
(skip). Default value:
true
.
Note
To use a basic security group, ensure nodes and Terway pods total no more than 2,000. For Terway clusters, use an advanced security group. |
| rds_instances | rds_instances | No | rm-2zev748xi27xc\*\*\*\* | Deprecated. The names of the ApsaraDB RDS instances. |
| cluster_spec | String | No | ack.pro.small | The ACK managed cluster type. Valid values: ack.pro.small (ACK Edge Pro) and ack.standard (ACK Edge Basic). Default value: ack.standard. If left empty, an ACK Edge Basic cluster is created.ack.standard
. See introduction to ACK Edge Pro clusters.
|
| resource_group_id | String | No | rg-acfm3mkrure\*\*\*\* | The resource group ID. Use to isolate clusters across resource groups. |
Response syntax
HTTP/1.1 200
Content-Type:application/json
{
"cluster_id" : "String",
"request_id" : "String",
"task_id" : "String"
}
Response parameters
Table 2. Response body parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| cluster_id | String | cb95aa626a47740afbf6aa099b650\*\*\*\* | The cluster ID. |
| request_id | String | 687C5BAA-D103-4993-884B-C35E4314A1E1 | The request ID. |
| task_id | String | T-5a54309c80282e39ea00002f | The task ID. |
Examples
Sample requests
POST /clusters
<Common request headers>
{
"name":"ACK Edge cluster",
"cluster_type":"ManagedKubernetes",
"disable_rollback":true,
"timeout_mins":60,
"kubernetes_version":"1.14.8-aliyunedge.1",
"region_id":"cn-zhangjiakou",
"snat_entry":true,
"cloud_monitor_flags":true,
"endpoint_public_access":true,
"deletion_protection":true,
"node_cidr_mask":"25",
"tags":[
{
"key":"tag-k",
"value":"tag-v"
}
],
"addons":[
{
"name":"logtail-ds-docker"
},
{
"name":"alibaba-log-controller",
"config":"{\"IngressDashboardEnabled\":\"false\"}"
},
{
"name":"flannel"
},
{
"name":"alicloud-monitor-controller"
}
],
"profile":"Edge", // Specifies that the cluster is an ACK Edge cluster.
"logging_type" : "SLS",
"worker_instance_types":[
"ecs.hfc6.large"
],
"runtime":{ // The configuration of the container runtime.
"name":"containerd", // The name of the container runtime.
"version":"1.6.20" // The version of the container runtime.
},
"num_of_nodes":1,
"worker_system_disk_category":"cloud_ssd",
"worker_system_disk_size":40,
"worker_data_disks":[
{
"category":"cloud_efficiency",
"size":"40",
"encrypted":"false",
"auto_snapshot_policy_id":"",
}
],
"worker_instance_charge_type":"PostPaid",
"vpcid":"vpc-8vb435kr467tnfj42****",
"container_cidr":"172.20.0.0/16",
"service_cidr":"172.21.0.0/20",
"vswitch_ids":[
"vsw-8vbhdhn461i65p32g****"
],
"login_password":"Hello1234",
"key_pair": "sin-name",
"security_group_id":"sg-8vb7grbyvlb10j0i****",
"is_enterprise_security_group":true,
"rds_instances": ["rm-xx","rm-xx"]
}
Sample success responses
XML format
<cluster_id>cb95aa626a47740afbf6aa099b650****</cluster_id>
<task_id>T-5a54309c80282e39ea00002f</task_id>
<request_id>687C5BAA-D103-4993-884B-C35E4314A1E1</request_id>
JSON format
{
"cluster_id": "cb95aa626a47740afbf6aa099b650****",
"task_id": "T-5a54309c80282e39ea00002f",
"request_id": "687C5BAA-D103-4993-884B-C35E4314A1E1"
}
Error codes
See the Error Center.
See Service error codes.
Developer resources
-
Alibaba Cloud SDKs handle request signing automatically. See the SDK reference.
-
Debug APIs and generate SDK code examples. Also provides an online CLI.
-
Manage and configure Alibaba Cloud resources from the command line.