CreateCluster
Creates an ACK cluster, including ACK managed clusters, ACK Serverless clusters, ACK Edge clusters, and registered clusters. When you create a cluster, you configure cluster information, cluster components, and ACK-related cloud resources.
Operation description
Generate OpenAPI request parameters through the console
When you call the CreateCluster operation to create a cluster, if the API call fails due to an incorrect combination of request parameters, you can generate the required combination of request parameters for cluster creation through the console. Proceed as follows:
-
Log on to the Container Service console. In the left-side navigation pane, choose Clusters.
-
On the Clusters page, click Cluster Templates.
-
In the dialog box, select the type of cluster you want to create, click Create, and then configure the cluster information on the cluster configuration page.
-
After the configuration is complete, on the Confirm Configuration page, click Equivalent Code in the upper-right corner. The dialog box displays the parameter combination required for creating the cluster, which you can copy and use.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:CreateCluster |
create |
*Cluster
|
|
None |
Request syntax
POST /clusters HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
cluster-demo |
access_control_list
deprecated
|
array |
No |
[Deprecated] The access control list (ACL) for the Server Load Balancer (SLB) instance of the API server in a registered cluster. |
|
|
string |
No |
The ACL for the SLB instance of the API server in a registered cluster. |
192.168.XX.XX/24 |
|
| addons |
array |
No |
The list of cluster components. When you create a cluster, you can use Network components: Required. Includes Flannel and Terway network types. Select one of them when you create a cluster:
Storage components: Optional. Only the
Log components: Optional. We recommend that you enable this component. If you do not enable Simple Log Service, you cannot use the cluster audit feature.
Ingress components: Optional. By default, the
Event center: Optional. Enabled by default. The event center provides capabilities such as storage, query, and alerting for Kubernetes events. The Logstore associated with the Kubernetes event center is free of charge for 90 days. For more information about the free quota policy, see Create and use a Kubernetes event center. Example of enabling the event center: [{"name":"ack-node-problem-detector","config":"{"sls_project_name":"your_sls_project_name"}"}]. |
|
| addon |
No |
The list of cluster components. When you create a cluster, you can use |
||
| api_audiences |
string |
No |
A ServiceAccount is the access credential for communication between pods and the cluster API server. For more information about |
kubernetes.default.svc |
| audit_log_config |
object |
No |
The cluster audit log configuration. |
|
| enabled |
boolean |
No |
Specifies whether to enable the cluster audit log feature. Valid values:
|
true |
| sls_project_name |
string |
No |
The SLS Project where the Logstore for cluster audit logs is located.
|
k8s-log-c2345xxxxxxxxxxxx |
| auto_mode |
object |
No |
The Auto Mode configuration. |
|
| enable |
boolean |
No |
Specifies whether to enable Auto Mode. Valid values:
|
true |
auto_renew
deprecated
|
boolean |
No |
[Deprecated] Specifies whether to enable auto-renewal. This parameter takes effect only when
Default value: This parameter was changed on October 15, 2024. For more information, see Announcement on parameter behavior changes of the CreateCluster API operation. |
true |
auto_renew_period
deprecated
|
integer |
No |
[Deprecated] The auto-renewal epoch. This parameter takes effect only when you select upfront and auto-renewal. When Default value: 1. This parameter was changed on October 15, 2024. For more information, see Announcement on parameter behavior changes of the CreateCluster API operation. |
1 |
charge_type
deprecated
|
string |
No |
[Deprecated] The billing method of the Classic Load Balancer (CLB) instance used by the API server. Default value: PostPaid. Valid values:
Important
For more information, see Service notices: Deprecation of the subscription billing method for the CLB instance of the API server in newly created clusters and Announcement on billing item adjustments for Classic Load Balancer (CLB). |
PostPaid |
cis_enabled
deprecated
|
boolean |
No |
[Deprecated] For the control plane configuration of a cluster, use the |
false |
| client_token |
string |
No |
The client token. |
0a287651-1277-4c0d-80d2-623a4***** |
cloud_monitor_flags
deprecated
|
boolean |
No |
[Deprecated] For the control plane node configuration of a cluster, use the Specifies whether to install the CloudMonitor agent for the cluster. Valid values:
Default value: |
false |
| cluster_domain |
string |
No |
The local domain name of the cluster. Naming rules: The domain name consists of one or more parts separated by periods (.). Each part can be up to 63 characters in length and can contain lowercase letters, digits, and hyphens (-). It must start and end with a lowercase letter or a digit. |
cluster.local |
| cluster_spec |
string |
No |
After you set
Pro XL, Pro 2XL, and Pro 4XL are the three tiers provided by ACK Pro Provisioned Control Plane. By pre-allocating and dedicating control plane resources, they ensure that API concurrency and pod scheduling capabilities are consistently maintained at a high level, which is suitable for AI training and inference, ultra-large-scale clusters, and mission-critical workloads. For the cluster management fees of Pro Edition and provisioned control plane editions, see Cluster management fees. |
ack.pro.small |
| cluster_type |
string |
No |
|
Kubernetes |
| container_cidr |
string |
No |
The CIDR block for pods. It must be a valid private CIDR block, specifically one of the following CIDR blocks or their subnets: 10.0.0.0/8, 172.16.0.0/12 to 172.31.0.0/16, and 192.168.0.0/16. It cannot overlap with the CIDR block of the VPC or the CIDR blocks used by existing Kubernetes clusters in the VPC. It cannot be modified after the cluster is created. For more information about cluster network planning, see Network planning for ACK managed clusters. Note
This parameter is required for Flannel clusters. |
172.20.0.0/16 |
| control_plane_config |
object |
No |
The control plane configuration for an ACK dedicated cluster. |
|
| auto_renew |
boolean |
No |
Specifies whether to enable auto-renewal for control plane nodes. This parameter takes effect only when the billing method is set to PrePaid. Valid values:
|
true |
| auto_renew_period |
integer |
No |
The auto-renewal period for control plane nodes. Valid values: 1, 2, 3, 6, and 12. Unit: months. Default value: 1. |
1 |
| charge_type |
string |
No |
The billing method for control plane nodes. Valid values:
|
PostPaid |
| cloud_monitor_flags |
boolean |
No |
Specifies whether to install the CloudMonitor agent on the nodes. Valid values:
|
false |
| cpu_policy |
string |
No |
The CPU management policy for the nodes. Valid values:
|
none |
| deploymentset_id |
string |
No |
The ID of the deployment set. |
ds-bp10b35imuam5amw**** |
| image_id |
string |
No |
The ID of the image. |
aliyun_3_x64_20G_alibase_20240819.vhd |
| image_type |
string |
No |
The type of the operating system image. |
AliyunLinux3 |
| instance_metadata_options | InstanceMetadataOptions |
No |
The instance metadata access configuration for ECS instances. |
|
| instance_types |
array |
No |
The instance types of the nodes. |
|
|
string |
No |
The instance type of the node. |
ecs.g6.large |
|
| key_pair |
string |
No |
The name of the key pair. You must specify either this parameter or login_password. |
ack |
| login_password |
string |
No |
The SSH logon password. The password must be 8 to 30 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. You must specify either this parameter or key_pair. |
******** |
| node_port_range |
string |
No |
[Deprecated] The service port range for nodes. |
30000-32767 |
| period |
integer |
No |
The subscription period for control plane nodes. This parameter is required and takes effect only when the billing method is set to PrePaid. Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Unit: months. Default value: 1. |
1 |
| period_unit |
string |
No |
The unit of the subscription period for control plane nodes. This parameter is required and takes effect only when the billing method is set to PrePaid. Valid value: Month. Currently, only months are supported. |
Month |
| runtime |
string |
No |
[Deprecated] The name of the container runtime for control plane nodes. Valid value: containerd: the containerd runtime, which is supported by all cluster versions. |
containerd |
| security_hardening_os |
boolean |
No |
Specifies whether to enable security hardening for Alibaba Cloud Linux. Valid values:
|
false |
| size |
integer |
No |
The number of control plane nodes. Valid values: 3 and 5. |
3 |
| soc_enabled |
boolean |
No |
Specifies whether to enable mlps 2.0 security hardening. Valid values:
|
false |
| system_disk_bursting_enabled |
boolean |
No |
Specifies whether to enable the performance burst feature for the system cloud disk of the node. Valid values:
|
true |
| system_disk_category |
string |
No |
The type of the system cloud disk for the node. Valid values:
|
cloud_ssd |
| system_disk_performance_level |
string |
No |
The performance level of the system cloud disk for the node. This parameter takes effect only for ESSDs. The performance level is related to the disk size. For more information, see standard SSD. |
PL1 |
| system_disk_provisioned_iops |
integer |
No |
The provisioned read and write IOPS for the system cloud disk of the node. Valid values: 0 to min(50,000, 1000 × capacity - baseline performance). Baseline performance = min(1,800 + 50 × capacity, 50,000). This parameter is supported only when system_disk_category is set to cloud_auto. |
1000 |
| system_disk_size |
integer |
No |
The size of the system cloud disk for the node. Valid values: 40 to 500. Unit: GiB. Default value: 120. |
120 |
| system_disk_snapshot_policy_id |
string |
No |
The ID of the automatic snapshot policy for the node. |
sp-2zej1nogjvovnz4z**** |
| control_plane_endpoints_config |
object |
No |
The connection configuration for the cluster. If you specify this parameter, the endpoint_public_access and load_balancer_id parameters do not take effect. To specify a CLB or NLB instance, use load_balancers_config to specify the corresponding instance ID. |
|
| internal_dns_config |
object |
No |
The internal DNS configuration for the cluster. This parameter applies to ACK managed clusters. The internal domain name is used by node-side system components such as kubelet and kube-proxy to access the API server. If internal domain name access is not enabled, node-side system components access the API server by using the IP address of the CLB instance. |
|
| bind_vpcs |
array |
No |
The VPCs where the internal DNS records of the cluster take effect. |
|
|
string |
No |
The VPCs where the internal DNS records of the cluster take effect. |
vpc-xxxx |
|
| load_balancers_config |
array<object> |
No |
The connection configuration for the cluster. If you specify this parameter, the endpoint_public_access and load_balancer_id parameters do not take effect. ACK supports automatic creation of NLB instances. To use an existing NLB instance, use load_balancers_config to specify the corresponding instance ID. |
|
|
object |
No |
The load balancing configuration for cluster access. |
||
| endpoint_type |
string |
No |
The type of the endpoint. |
private |
| load_balancer_id |
string |
No |
The ID of the NLB instance. |
nlb-0ogk9aaxxxxxxx |
| controlplane_log_components |
array |
No |
The list of component names. This parameter specifies the control plane components whose logs are collected. By default, logs of kube-apiserver, kube-controller-manager, kube-scheduler, and cloud-controller-manager are collected. |
|
|
string |
No |
The list of component names. This parameter specifies the control plane components whose logs are collected. By default, logs of kube-apiserver, kube-controller-manager, kube-scheduler, and cloud-controller-manager are collected. |
["apiserver","kcm","scheduler"] |
|
| controlplane_log_project |
string |
No |
The Log Service project for control plane component logs. You can use an existing project for log storage or use automatic creation to create a project for log storage. If you choose automatic creation, a Log Service project named k8s-log-{ClusterID} is created. |
k8s-log-xxx |
| controlplane_log_ttl |
string |
No |
The log retention period for control plane component logs. |
30 |
cpu_policy
deprecated
|
string |
No |
[Deprecated] Use the cpu_policy parameter under control_plane_config for cluster control plane configuration, and use the cpu_policy parameter under kubernetes_config in nodepool for node pool configuration. The CPU management policy for the nodes. If the cluster version is 1.12.6 or later, the following policies are supported:
|
none |
custom_san
deprecated
|
string |
No |
[Deprecated] Use the extra_sans parameter instead. The SANs of the custom certificate. Separate multiple IP addresses or domain names with commas (,). |
cs.aliyun.com |
| deletion_protection |
boolean |
No |
Specifies whether to enable cluster deletion protection to prevent accidental deletion of the cluster through the console or API. Valid values:
|
true |
disable_rollback
deprecated
|
boolean |
No |
[Deprecated] By default, no rollback is performed when cluster creation fails. You must manually clean up the failed cluster. Specifies whether to perform a rollback when cluster creation fails. Valid values:
|
true |
enable_rrsa
deprecated
|
boolean |
No |
[Deprecated] Use the rrsa_config parameter instead. Specifies whether to enable RAM Roles for Service Accounts (RRSA). Valid values:
|
false |
| encryption_provider_key |
string |
No |
The ID of the Key Management Service (KMS) key used to encrypt data cloud disks. For more information, see Key Management Service. Note
This feature takes effect only in ACK Pro clusters. |
0fe64791-55eb-4fc7-84c5-c6c7cdca**** |
| endpoint_public_access |
boolean |
No |
Specifies whether to enable public network access. An elastic IP address (EIP) is used to expose the API Server for public network access to the cluster. Valid values:
|
true |
| extra_sans |
array |
No |
The custom Subject Alternative Name (SAN) for the API Server certificate. |
|
|
string |
No |
The certificate SAN. Custom IP addresses or domain names are supported. |
192.168.xx.xx |
|
format_disk
deprecated
|
boolean |
No |
[Deprecated] Selecting existing nodes during cluster creation is not supported. To add existing nodes to a cluster, create a node pool first and call the AttachInstancesToNodePool operation. Specifies whether to mount data cloud disks to existing instances when creating a cluster with existing instances. Valid values:
|
false |
image_id
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the image_id parameter under control_plane_config instead. For node pool configurations, use the image_id parameter under scaling_group in nodepool instead. The custom image for nodes. By default, the system image is used. If a custom image is selected, it replaces the default system image. For more information, see Custom images. |
m-bp16z7xko3vvv8gt**** |
image_type
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the image_type parameter under control_plane_config instead. For node pool configurations, use the image_type parameter under scaling_group in nodepool instead. The operating system distribution type. We recommend that you use this field to specify the node operating system. Valid values:
|
AliyunLinux |
instances
deprecated
|
array |
No |
[Deprecated] Selecting existing nodes during cluster creation is not supported. To add existing nodes to a cluster, create a node pool first and call the AttachInstancesToNodePool operation. The list of ECS instances to be added as worker nodes when creating a cluster with existing nodes. Note
This field is required when creating a cluster with existing instances. |
|
|
string |
No |
The list of ECS instances to be added as worker nodes when creating a cluster with existing nodes. Note
This field is required when creating a cluster with existing instances. |
i-2ze4zxnm36vq00xn**** |
|
| ip_stack |
string |
No |
The IP protocol stack of the cluster. Valid values:
Valid values:
|
ipv4 |
| is_enterprise_security_group |
boolean |
No |
Specifies whether to enable automatic creation of an advanced security group. This parameter takes effect when security_group_id is empty. Note
When a basic security group is used, the total number of nodes and Terway pods in the cluster cannot exceed 2,000. Therefore, we recommend that you use an advanced security group when creating a cluster of the Terway network type.
|
true |
keep_instance_name
deprecated
|
boolean |
No |
[Deprecated] Selecting existing nodes during cluster creation is not supported. To add existing nodes to a cluster, create a node pool first and call the AttachInstancesToNodePool operation. Specifies whether to retain the instance names when creating a cluster with existing instances. Valid values:
|
true |
key_pair
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the key_pair parameter under control_plane_config instead. For node pool configurations, use the key_pair parameter under scaling_group in nodepool instead. The name of the key pair. This parameter is mutually exclusive with login_password. |
security-key |
| kubernetes_version |
string |
No |
The cluster version, which is consistent with the Kubernetes community baseline version. We recommend that you select the latest version. If not specified, the latest version is used by default. Clusters of the latest three versions can be created. You can call the DescribeKubernetesVersionMetadata operation to query the supported cluster versions. For more information about the Kubernetes versions supported by ACK, see Kubernetes version release notes. |
1.32.1-aliyun.1 |
| load_balancer_id |
string |
No |
The instance ID of the Classic Load Balancer (CLB) used for API Server access. If you specify this parameter, automatic creation of an API Server CLB is not performed. Note
Make sure that the CLB instance has no other dependencies, such as listeners or backend servers. Shared and Internet-facing CLB instances are not supported. |
lb-wz9t256gqa3vbouk**** |
load_balancer_spec
deprecated
|
string |
No |
[Deprecated] CLB billing is based on usage, so this parameter does not take effect. The load balancing specification. Valid values:
|
slb.s2.small |
logging_type
deprecated
|
string |
No |
[Deprecated] Enables Simple Log Service for the cluster. This parameter takes effect only for ACK Serverless clusters and must be set to SLS. |
SLS |
login_password
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the login_password parameter under control_plane_config instead. For node pool configurations, use the login_password parameter under scaling_group in nodepool instead. The SSH logon password. This parameter is mutually exclusive with key_pair. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. |
null |
| maintenance_window | maintenance_window |
No |
The cluster maintenance window. |
|
master_auto_renew
deprecated
|
boolean |
No |
[Deprecated] For cluster control plane configurations, use the auto_renew parameter under control_plane_config instead. Specifies whether to enable auto-renewal for master nodes. This parameter takes effect only when master_instance_charge_type is set to PrePaid. Valid values:
|
true |
master_auto_renew_period
deprecated
|
integer |
No |
[Deprecated] For cluster control plane configurations, use the auto_renew_period parameter under control_plane_config instead. The auto-renewal epoch for master nodes. This parameter is required and takes effect only when the subscription billing method is selected. Valid values: 1, 2, 3, 6, and 12. Default value: 1. |
1 |
master_count
deprecated
|
integer |
No |
[Deprecated] For cluster control plane configurations, use the size parameter under control_plane_config instead. The number of master nodes. Valid values: 3 and 5. Default value: 3. |
3 |
master_instance_charge_type
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the instance_charge_type parameter under control_plane_config instead. The billing method for master nodes. Valid values:
|
PrePaid |
master_instance_types
deprecated
|
array |
No |
[Deprecated] For cluster control plane configurations, use the instance_types parameter under control_plane_config instead. The instance types of master nodes. For more information, see Instance families. |
|
|
string |
No |
The instance types of master nodes. The number of specified instance types must be consistent with master_count and correspond one-to-one with the elements in master_instance_types. For more information, see Instance families. |
ecs.n4.xlarge |
|
master_period
deprecated
|
integer |
No |
[Deprecated] For cluster control plane configurations, use the unit parameter under control_plane_config instead. The subscription duration for master nodes. This parameter is required and takes effect only when master_instance_charge_type is set to PrePaid. Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1. |
1 |
master_period_unit
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the period_unit parameter under control_plane_config instead. The subscription period unit for master nodes. This parameter is required when the billing method is PrePaid. Valid value: Month. Currently, only month is supported. |
Month |
master_system_disk_category
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the system_disk_category parameter under control_plane_config instead. The system cloud disk category for master nodes. Valid values:
|
cloud_ssd |
master_system_disk_performance_level
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the system_disk_performance_level parameter under control_plane_config instead. The system cloud disk performance level for master nodes. This parameter takes effect only for ESSDs. The performance level is related to the disk size. For more information, see ESSD standard SSD. |
PL1 |
master_system_disk_size
deprecated
|
integer |
No |
[Deprecated] For cluster control plane configurations, use the system_disk_size parameter under control_plane_config instead. The system cloud disk size for master nodes. Valid values: 40 to 500. Unit: GiB. Default value: 120. |
120 |
master_system_disk_snapshot_policy_id
deprecated
|
string |
No |
[Deprecated] For cluster control plane configurations, use the system_disk_snapshot_policy_id parameter under control_plane_config instead. The ID of the automatic snapshot policy applied to the system cloud disks of master nodes. |
sp-2zej1nogjvovnz4z**** |
master_vswitch_ids
deprecated
|
array |
No |
[Deprecated] Use the vswitch_ids parameter instead. The list of vSwitch IDs for master nodes. You can specify 1 to 3 vSwitches. To ensure high availability of the cluster, we recommend that you select three vSwitches in different zones. The number of specified vSwitches must be consistent with master_count and correspond one-to-one with the elements in master_vswitch_ids. |
|
|
string |
No |
The list of vSwitch IDs for master nodes. You can specify 1 to 3 vSwitches. To ensure high availability of the cluster, we recommend that you select three vSwitches in different zones. The number of specified vSwitches must be consistent with master_count and correspond one-to-one with the elements in master_vswitch_ids. |
vsw-2ze3ds0mdip0hdz8i**** |
|
| name |
string |
Yes |
The custom cluster name. The name must be 1 to 63 characters in length and can contain digits, Chinese characters, English letters, and hyphens (-). It cannot start with a hyphen (-). |
cluster-demo |
nat_gateway
deprecated
|
boolean |
No |
[Deprecated] Use the snat_entry parameter instead. |
true |
| node_cidr_mask |
string |
No |
The number of IP addresses for nodes. The number of IP addresses is determined by the CIDR block of the specified network. This parameter takes effect only for clusters of the Flannel network type. Default value: 26. |
25 |
node_name_mode
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the node_name_mode parameter under kubernetes_config in nodepool instead. |
null |
node_port_range
deprecated
|
string |
No |
The node service port range. Valid values: 30000 to 65535. Default value: 30000-32767. |
30000~32767 |
| nodepools |
array |
No |
The list of node pools. |
|
| nodepool |
No |
The node pool configuration. |
||
num_of_nodes
deprecated
|
integer |
No |
[Deprecated] For node pool configurations, use the desired_size parameter under scaling_group in nodepool instead. The number of worker nodes. Valid values: 0 to 100. |
3 |
| operation_policy |
object |
No |
The automatic O&M policy for the cluster. |
|
| cluster_auto_upgrade |
object |
No |
The automatic cluster upgrade settings. |
|
| channel |
string |
No |
The automatic cluster upgrade channel. Valid values:
|
stable |
| enabled |
boolean |
No |
Specifies whether to enable automatic cluster upgrade. Valid values:
|
true |
os_type
deprecated
|
string |
No |
[Deprecated] For control plane node configurations, use the image_type parameter under control_plane_config instead. For node pool configurations, use the image_type parameter under scaling_group in nodepool instead. The operating system platform type. Valid values:
|
Linux |
period
deprecated
|
integer |
No |
[Deprecated] The subscription duration. This parameter takes effect and is required only when charge_type is set to PrePaid. Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1. This field was changed on October 15, 2024. For more information, see Announcement on parameter behavior changes of the CreateCluster API operation. |
1 |
period_unit
deprecated
|
string |
No |
[Deprecated] The billing cycle. This parameter is required when the billing method is PrePaid. Valid values: Month. Currently, only monthly billing is supported. This field was changed on October 15, 2024. For more information, see Announcement on parameter behavior changes of the CreateCluster API operation. |
Month |
platform
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the platform parameter under scaling_group in nodepool instead. The operating system distribution. Valid values:
|
CentOS |
pod_vswitch_ids
deprecated
|
array |
No |
[Deprecated] When the Terway network plug-in is selected, you must specify the vSwitches used to assign IP addresses to pods. Each pod vSwitch corresponds to a worker node vSwitch, and the pod vSwitch and the worker node vSwitch must be in the same zone. Note
We recommend that the subnet mask of the pod vSwitch be /19 to /25. Otherwise, the number of allocatable pod IP addresses in the cluster network will be highly limited, which may affect the normal operation of the cluster. |
|
|
string |
No |
When the Terway network plug-in is selected, you must specify the vSwitches used to assign IP addresses to pods. Each pod vSwitch corresponds to a worker node vSwitch, and the pod vSwitch and the worker node vSwitch must be in the same zone. Note
We recommend that the subnet mask of the pod vSwitch be /19 to /25. Otherwise, the number of allocatable pod IP addresses in the cluster network will be highly limited, which may affect the normal operation of the cluster. |
vsw-2ze97jwri7cei0mpw**** |
|
| profile |
string |
No |
The subtype of the cluster. This parameter is available only when
|
Default |
| proxy_mode |
string |
No |
The kube-proxy mode. Valid values:
|
ipvs |
rds_instances
deprecated
|
array |
No |
[Deprecated] For node pool configurations, use the rds_instances parameter under scaling_group in nodepool instead. The list of ApsaraDB RDS instances. Select the ApsaraDB RDS instances to which you want to add the whitelist. We recommend that you add the pod CIDR block and node CIDR block to the ApsaraDB RDS whitelist. If you specify ApsaraDB RDS instances here, nodes may fail to be added because the instances are not in the running state. |
|
|
string |
No |
The ApsaraDB RDS instance to which you want to add the whitelist. We recommend that you add the pod CIDR block and node CIDR block to the ApsaraDB RDS whitelist. If you specify ApsaraDB RDS instances here, nodes may fail to be added because the instances are not in the running state. |
rm-2zev748xi27xc**** |
|
| region_id |
string |
Yes |
The region ID of the cluster. For more details, see Regions and zones supported by Container Service. |
cn-beijing |
| resource_group_id |
string |
No |
The ID of the resource group to which the cluster belongs. This parameter is used to isolate different resources. |
rg-acfm3mkrure**** |
| rrsa_config |
object |
No |
The configuration of the RAM Roles for Service Accounts (RRSA) feature. |
|
| enabled |
boolean |
No |
Specifies whether to enable the RRSA feature. Valid values:
|
true |
runtime
deprecated
|
runtime |
No |
The container runtime of the cluster. Valid values: containerd, sandboxed container, and Docker. Note
Kubernetes 1.24 and later no longer support Docker as a built-in container runtime. For more information, see Comparison among Docker, containerd, and sandboxed container. |
|
| security_group_id |
string |
No |
The ID of the existing security group. This parameter and is_enterprise_security_group are mutually exclusive. Cluster nodes are automatically added to this security group. |
sg-bp1bdue0qc1g7k**** |
security_hardening_os
deprecated
|
boolean |
No |
[Deprecated] For control plane configurations, use the security_hardening_os parameter under control_plane_config instead. For node pool configurations, use the security_hardening_os parameter under scaling_group in nodepool instead. Specifies whether to enable Alibaba Cloud OS security hardening. Valid values:
|
false |
| service_account_issuer |
string |
No |
A ServiceAccount is an access credential for communication between pods and the cluster API server. The service-account-issuer is the issuer identity in the ServiceAccount token, which is the iss field in the token payload. For more information about ServiceAccount, see Deploy ServiceAccount token volume projection. |
kubernetes.default.svc |
| service_cidr |
string |
No |
The CIDR block of the Service network. Valid values: 10.0.0.0/16 to 10.0.0.0/24, 172.16.0.0/16 to 172.31.0.0/24, and 192.168.0.0/16 to 192.168.0.0/24. The CIDR block cannot overlap with the VPC CIDR block 10.1.0.0/21 or the CIDR blocks used by existing Kubernetes clusters in the VPC. The CIDR block cannot be modified after the cluster is created. Default value: 172.19.0.0/20. |
172.21.0.0/20 |
service_discovery_types
deprecated
|
array |
No |
[Deprecated] The service discovery type in the cluster. This parameter is used to specify the service discovery method in ACK Serverless clusters. Valid values:
|
|
|
string |
No |
The service discovery type in the cluster. This parameter is used to specify the service discovery method in ACK Serverless clusters. Valid values:
|
PrivateZone |
|
| snat_entry |
boolean |
No |
Specifies whether to configure SNAT for the VPC. Valid values:
Note
If you do not enable this feature when you create the cluster, you can manually enable it later if your business needs to access the Internet. Default value: false. |
false |
soc_enabled
deprecated
|
boolean |
No |
[Deprecated] For control plane node configurations, use the soc_enabled parameter under control_plane_config instead. For node pool configurations, use the soc_enabled parameter under scaling_group in nodepool instead. Specifies whether to enable MLPS 2.0 security hardening. For more information, see ACK MLPS 2.0 security hardening instructions. Valid values:
|
false |
| ssh_flags |
boolean |
No |
Specifies whether to enable public SSH access. This parameter is used to log on to the master nodes of an ACK dedicated cluster. This parameter does not take effect in managed clusters. Valid values:
|
true |
| support_policy |
string |
No |
The support policy for the cluster version. The values are case-sensitive. Valid values:
|
Extended |
| tags |
array |
No |
The node tags. Tag definition rules:
|
|
| tag |
No |
The node tags. Tag definition rules:
|
||
taints
deprecated
|
array |
No |
[Deprecated] For node pool configurations, use the taints parameter under kubernetes_config in nodepool instead. The node taint information. Taints and tolerations work together to prevent pods from being scheduled to inappropriate nodes. For more information, see Taints and Tolerations. |
|
| taint |
No |
The node taint information. Taints and tolerations work together to prevent pods from being scheduled to inappropriate nodes. For more information, see Taints and Tolerations. |
||
timeout_mins
deprecated
|
integer |
No |
[Deprecated] By default, no rollback is performed when cluster creation fails. You must manually clean up the failed cluster. The timeout period for cluster creation, in minutes. Default value: 60. |
60 |
| timezone |
string |
No |
The time zone used by the cluster. For more information, see Supported time zones. |
Asia/Shanghai |
| user_ca |
string |
No |
The custom cluster CA certificate. |
-----BEGIN CERTIFICATE-----**** |
user_data
deprecated
|
string |
No |
[Deprecated] The custom node data. |
IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFD**** |
| vpcid |
string |
No |
The VPC used by the cluster. You must specify a VPC when you create the cluster. |
vpc-2zeik9h3ahvv2zz95**** |
| vswitch_ids |
array |
No |
The vSwitches where the cluster nodes reside. This parameter is required when you create a managed cluster with zero nodes. |
|
|
string |
No |
The vSwitches where the cluster nodes reside. This parameter is required when you create a managed cluster with zero nodes. |
vsw-2ze3ds0mdip0hdz8i**** |
|
worker_auto_renew
deprecated
|
boolean |
No |
[Deprecated] For node pool configurations, use the auto_renew parameter under scaling_group in nodepool instead. Specifies whether to enable auto-renewal for worker nodes. This parameter takes effect only when worker_instance_charge_type is set to PrePaid. Valid values:
|
true |
worker_auto_renew_period
deprecated
|
integer |
No |
[Deprecated] For node pool configurations, use the auto_renew_period parameter under scaling_group in nodepool instead. The auto-renewal period for worker nodes. This parameter takes effect and is required only when the subscription billing method is selected. Valid values: 1, 2, 3, 6, and 12. |
1 |
worker_data_disks
deprecated
|
array<object> |
No |
[Deprecated] For node pool configurations, use the |
|
|
object |
No |
The collection of data cloud disk configurations. |
||
| category |
string |
Yes |
The type of the data cloud disk. |
cloud_essd |
| encrypted |
string |
No |
Specifies whether to encrypt the data cloud disk. Valid values:
Default value: |
true |
| performance_level |
string |
No |
The performance level of the data cloud disk. This parameter takes effect only for ESSDs. |
PL1 |
| size |
string |
Yes |
The size of the data cloud disk. Valid values: 40 to 32767. Unit: GiB. |
120 |
worker_instance_charge_type
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the
Default value: |
PrePaid |
worker_instance_types
deprecated
|
array |
No |
[Deprecated] For node pool configurations, use the |
|
|
string |
No |
The instance type of the worker node. You must specify at least one instance type. For more information, see Instance families. Note
The priority of an instance type decreases as its position in the list moves down. If an instance cannot be created based on the instance type with the highest priority, the system automatically selects the next instance type in the priority list to create the instance. |
ecs.n4.large |
|
worker_period
deprecated
|
integer |
No |
[Deprecated] For node pool configurations, use the Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1. |
1 |
worker_period_unit
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the Valid value: |
Month |
worker_system_disk_category
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the Valid values:
Default value: |
cloud_efficiency |
worker_system_disk_performance_level
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the Valid values:
|
PL1 |
worker_system_disk_size
deprecated
|
integer |
No |
[Deprecated] For node pool configurations, use the Valid values: 40 to 500. The value of this parameter must be greater than or equal to the maximum value between 40 and the image size. Default value: |
120 |
worker_system_disk_snapshot_policy_id
deprecated
|
string |
No |
[Deprecated] For node pool configurations, use the |
sp-2zej1nogjvovnz4z**** |
worker_vswitch_ids
deprecated
|
array |
No |
[Deprecated] For node pool configurations, use the When you create a managed cluster with zero nodes, the |
|
|
string |
No |
The list of vSwitches for worker nodes. You can specify 1 to 20 vSwitches. To ensure high availability, we recommend that you select vSwitches in different zones. When you create a managed cluster with zero nodes, the |
vsw-2ze3ds0mdip0hdz8i**** |
|
zone_id
deprecated
|
string |
No |
[Deprecated] Use the When you create a managed ACK cluster, if you do not specify |
cn-beiji**** |
| zone_ids |
array |
No |
The IDs of multiple zones in the region where the cluster resides. This parameter is specific to managed ACK clusters. |
|
|
string |
No |
The ID of the zone in the region where the cluster resides. A vSwitch is automatically created in the zone. When you create a managed ACK cluster, if you do not specify |
cn-beijing-h |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| cluster_id |
string |
The ID of the cluster. |
cb95aa626a47740afbf6aa099b650**** |
| request_id |
string |
The ID of the request. |
687C5BAA-D103-4993-884B-C35E4314**** |
| task_id |
string |
The ID of the task. |
T-5a54309c80282e39ea**** |
Examples
Success response
JSON format
{
"cluster_id": "cb95aa626a47740afbf6aa099b650****",
"request_id": "687C5BAA-D103-4993-884B-C35E4314****",
"task_id": "T-5a54309c80282e39ea****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.