ALIYUN::CS::ClusterNodePool is used to create a node pool for a Container Service for Kubernetes (ACK) cluster.
Syntax
{
"Type": "ALIYUN::CS::ClusterNodePool",
"Properties": {
"TeeConfig": Map,
"ClusterId": String,
"NodePoolInfo": Map,
"KubernetesConfig": Map,
"Count": Integer,
"Management": Map,
"AutoScaling": Map,
"ScalingGroup": Map
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
TeeConfig | Map | No | No | The confidential computing configurations of the cluster. | For more information, see TeeConfig syntax and TeeConfig properties. |
ClusterId | String | Yes | No | The ID of the cluster. | You can call the DescribeClustersV1 operation to query the cluster ID. |
NodePoolInfo | Map | No | No | The configurations of the node pool. | For more information, see NodePoolInfo syntax and NodePoolInfo properties. |
KubernetesConfig | Map | No | No | The configurations of the cluster. | For more information, see KubernetesConfig syntax and KubernetesConfig properties. |
Count | Integer | No | No | The number of nodes in the node pool. | None. |
Management | Map | No | No | The configurations of the managed node pool. | For more information, see Management syntax and Management properties. |
AutoScaling | Map | No | No | The auto scaling configurations of the cluster. | For more information, see AutoScaling syntax and AutoScaling properties. |
ScalingGroup | Map | Yes | No | The configurations of the scaling group that is used by the node pool. |
You can call the DescribeClusterNodePools operation to query the configurations of the scaling group. For more information, see ScalingGroup syntax and ScalingGroup properties. |
TeeConfig syntax
"TeeConfig": {
"TeeEnable": Boolean
}
TeeConfig properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
TeeEnable | Boolean | Yes | No | Specifies whether to enable confidential computing for the cluster. | Default value: false. Valid values:
|
NodePoolInfo syntax
"NodePoolInfo": {
"ResourceGroupId": String,
"Name": String
}
NodePoolInfo properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ResourceGroupId | String | No | No | The ID of the resource group to which the node pool belongs. | None. |
Name | String | Yes | No | The name of the node pool. | None. |
KubernetesConfig syntax
"KubernetesConfig": {
"CpuPolicy": String,
"Runtime": String,
"CmsEnabled": Boolean,
"UserData": String,
"NodeNameMode": String,
"RuntimeVersion": String,
"Labels": List,
"Unschedulable": Boolean,
"Taints": List
}
KubernetesConfig properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
CpuPolicy | String | No | No | The CPU management policy of the node. | If the Kubernetes version of the cluster is 1.12.6 or later, the default value of
the CpuPolicy property is none and the following values are valid:
|
Runtime | String | Yes | No | The name of the container runtime. | None. |
CmsEnabled | Boolean | No | No | Specifies whether to install CloudMonitor on Elastic Compute Service (ECS) nodes. |
After you install CloudMonitor on ECS nodes, you can view the monitoring information about the nodes in the CloudMonitor console. We recommend that you set this property to true. Default value: false. Valid values:
|
UserData | String | No | No | The user data on the node. | None. |
NodeNameMode | String | No | No | The custom name of the node. | A node name consists of a prefix, an IP address substring, and a suffix.
|
RuntimeVersion | String | Yes | No | The version of the container runtime. | None. |
Labels | List | No | No | The labels that you want to add to the nodes in the cluster. |
For more information, see Labels syntax and Labels properties. |
Unschedulable | Boolean | No | No | Specifies whether to schedule the newly added node. | Default value: false. Valid values:
|
Taints | List | No | No | The configurations of the taints. |
For more information, see Taints syntax and Taints properties. |
Labels syntax
"Labels": [
{
"Value": String,
"Key": String
}
]
Labels properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Value | String | Yes | No | The value of the label. | None. |
Key | String | Yes | No | The key of the label. | None. |
Taints syntax
"Taints": [
{
"Value": String,
"Effect": String,
"Key": String
}
]
Taints properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Value | String | Yes | No | The value of the taint. | None. |
Effect | String | No | No | The scheduling policy of the taint. | Default value: NoSchedule. Valid values:
|
Key | String | Yes | No | The name of the taint. | None. |
Management syntax
"Management": {
"UpgradeConfig": Map,
"AutoRepair": Boolean,
"Enable": Boolean
}
Management properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
UpgradeConfig | Map | No | No | The automatic upgrade configurations of the cluster. | This property takes effect only when you set the Enable property to true.
For more information, see UpgradeConfig syntax and UpgradeConfig properties. |
AutoRepair | Boolean | No | No | Specifies whether to enable automatic repair. | This property takes effect only when you set the Enable property to true.
Default value: false. Valid values:
|
Enable | Boolean | Yes | No | Specifies whether to enable the managed node pool. | Default value: false. Valid values:
|
UpgradeConfig syntax
"UpgradeConfig": {
"AutoUpgrade": Boolean,
"SurgePercentage": Integer,
"Surge": Integer,
"MaxUnavailable": Integer
}
UpgradeConfig properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
AutoUpgrade | Boolean | No | No | Specifies whether to enable automatic upgrade. | Default value: false. Valid values:
|
SurgePercentage | Integer | No | No | The proportion of additional nodes to total nodes in the node pool. | You can specify the SurgePercentage or Surge property. |
Surge | Integer | No | No | The number of additional nodes. | You can specify the SurgePercentage or Surge property. |
MaxUnavailable | Integer | No | No | The maximum number of nodes that are in the Unschedulable state. | Valid values: 1 to 1000. Default value: 1. |
AutoScaling syntax
"AutoScaling": {
"EipBandwidth": Integer,
"Type": String,
"IsBondEip": Boolean,
"MinInstances": Integer,
"Enable": Boolean,
"MaxInstances": Integer,
"EipInternetChargeType": String
}
AutoScaling properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
EipBandwidth | Integer | No | No | The peak bandwidth of the elastic IP address (EIP). | None. |
Type | String | No | No | The type of auto scaling. | Default value: cpu. The value of the Type property varies based on the type of the
instance that can be used for auto scaling of the node pool. Valid values:
|
IsBondEip | Boolean | No | No | Specifies whether to associate an EIP with the node pool. | Default value: false. Valid values:
|
MinInstances | Integer | No | No | The minimum number of instances that the scaling group can contain. | None. |
Enable | Boolean | Yes | No | Specifies whether to enable auto scaling for the node pool. | Default value: false. Valid values:
|
MaxInstances | Integer | No | No | The maximum number of instances that the scaling group can contain. | None. |
EipInternetChargeType | String | No | No | The metering method for network usage of the EIP. | Default value: PayByBandwidth. Valid values:
|
ScalingGroup syntax
"ScalingGroup": {
"SpotInstanceRemedy": Boolean,
"Platform": String,
"DataDisks": List,
"SystemDiskSize": Integer,
"CompensateWithOnDemand": Boolean,
"InstanceChargeType": String,
"OnDemandPercentageAboveBaseCapacity": Integer,
"AutoRenew": Boolean,
"OnDemandBaseCapacity": Integer,
"SystemDiskPerformanceLevel": String,
"ImageId": String,
"SpotPriceLimit": List,
"InstanceTypes": List,
"Tags": List,
"SpotStrategy": String,
"LoginPassword": String,
"MultiAzPolicy": String,
"AutoRenewPeriod": Integer,
"ScalingPolicy": String,
"KeyPair": String,
"VSwitchIds": List,
"SecurityGroupId": String,
"SpotInstancePools": Integer,
"Period": Integer,
"InternetChargeType": String,
"SystemDiskCategory": String,
"InternetMaxBandwidthOut": Integer,
"RdsInstances": List,
"PeriodUnit": String,
"ZoneIds": List
}
ScalingGroup properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
SpotInstanceRemedy | Boolean | No | No | Specifies whether to use preemptible instances. | Default value: true. Valid values:
|
Platform | String | No | No | The OS. | Default value: AliyunLinux. Valid values:
|
DataDisks | List | No | No | The configurations of the data disks that you want to attach to the nodes in the node pool. | For more information, see DataDisks syntax and DataDisks properties. |
SystemDiskSize | Integer | Yes | No | The system disk size of the node. | Unit: GiB. Valid values: 40 to 500. |
CompensateWithOnDemand | Boolean | No | No | Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances when the system cannot create sufficient preemptible instances due to reasons such as the price or insufficient inventory. This property takes effect only when you set the MultiAzPolicy property to COST_OPTIMIZED. | Default value: true. Valid values:
|
InstanceChargeType | String | No | No | The billing method of the nodes in the node pool. | Default value: PostPaid. Valid values:
|
OnDemandPercentageAboveBaseCapacity | Integer | No | No | The proportion of pay-as-you-go instances to the extra instances that exceed the number specified by the OnDemandBaseCapacity property. | Valid values: 0 to 100. |
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal for the nodes in the node pool. | This property takes effect only when you set the InstanceChargeType property to PrePaid.
Default value: true. Valid values:
|
OnDemandBaseCapacity | Integer | No | No | The minimum number of pay-as-you-go instances that the scaling group must contain. | Valid values: 0 to 1000. The system preferentially creates pay-as-you-go instances when the number of pay-as-you-go instances is less than the value of this property. |
SystemDiskPerformanceLevel | String | No | No | The performance level (PL) of the enhanced SSD (ESSD) that is used as the system disk. | Valid values:
|
ImageId | String | No | No | The ID of the custom image. | By default, the image that is provided by ACK is used. |
SpotPriceLimit | List | No | No | The maximum hourly price for the instance. | The value of this property can contain up to three decimal places. This property takes
effect only when you set the SpotStrategy property to SpotWithPriceLimit.
For more information, see SpotPriceLimit syntax and SpotPriceLimit properties. |
InstanceTypes | List | Yes | No | The instance type of the preemptible instances. | None. |
Tags | List | No | No | The labels that you want to add only to ECS instances. | A label key must be unique and cannot exceed 128 characters in length. Label keys
and values cannot start with aliyun or acs: , and cannot contain https:// or http:// .
For more information, see Tags syntax and Tags properties. |
SpotStrategy | String | No | No | The bidding policy for the instance. | Valid values:
|
LoginPassword | String | No | No | The password for SSH logon. | You can specify the KeyPair or LoginPassword property.
The password must be 8 to 30 characters in length and contain the following character
types: letters, digits, and special characters. Special characters include |
MultiAzPolicy | String | No | No | The scaling policy for the ECS instances in a multi-zone scaling group. | Default value: PRIORITY. Valid values:
|
AutoRenewPeriod | Integer | No | No | The auto-renewal period for the nodes in the node pool. | This property takes effect and is required only if you set the InstanceChargeType
property to PrePaid and the AutoRenew property to true.
If you set the PeriodUnit property to Month, the default value of the AutoRenewPeriod property is 1 and the following values are valid:
|
ScalingPolicy | String | No | No | The scaling mode of the scaling group. | Default value: release. Valid values:
|
KeyPair | String | No | No | The name of the key pair that is used for password-free logon. |
You can specify the KeyPair or LoginPassword property. Note If you create a managed node pool, only the KeyPair property is supported.
|
VSwitchIds | List | Yes | No | The ID of the vSwitch. | None. |
SecurityGroupId | String | No | No | The ID of the security group. | None. |
SpotInstancePools | Integer | No | No | The number of available instance types. The system evenly creates preemptible instances of multiple instance types that are available at the lowest cost in the scaling group. | Valid values: 1 to 10. |
Period | Integer | No | No | The auto-renewal period for the nodes in the node pool. This property takes effect and is required only if you set the InstanceChargeType property to PrePaid and the AutoRenew property to true. | If you set the PeriodUnit property to Month, the default value of the Period property
is 1 and the following values are valid:
|
InternetChargeType | String | No | No | The metering method for network usage. | Default value: PayByBandwidth. Valid values:
|
SystemDiskCategory | String | No | No | The system disk category of the node. | Default value: cloud_efficiency. Valid values:
|
InternetMaxBandwidthOut | Integer | No | No | The maximum outbound public bandwidth. |
Unit: Mbit/s. Valid values: 1 to 100. |
RdsInstances | List | No | No | The IDs of the ApsaraDB RDS instances. | None. |
PeriodUnit | String | No | No | The unit of the subscription duration of nodes in the node pool. | This property is required only if you set the InstanceChargeType property to PrePaid.
Valid values:
|
ZoneIds | List | No | No | The IDs of the zones. | None. |
DataDisks syntax
"DataDisks": [
{
"Category": String,
"Encrypted": Boolean,
"PerformanceLevel": String,
"Size": Integer,
"AutoSnapshotPolicyId": String
}
]
DataDisks properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Category | String | No | No | The category of the data disk. | Default value: cloud_efficiency. Valid values:
|
Encrypted | Boolean | No | No | Specifies whether to encrypt the data disk. | Default value: false. Valid values:
|
PerformanceLevel | String | No | No | The PL of the ESSD that is used as the data disk. | Valid values:
|
Size | Integer | No | No | The size of the data disk. | Valid values: 40 to 32768.
Default value: 120. Unit: GiB. |
AutoSnapshotPolicyId | String | No | No | The ID of the automatic snapshot policy. The system performs automatic backup for a cloud disk based on the specified automatic snapshot policy. | By default, this property is empty. This indicates that automatic backup is not performed. |
SpotPriceLimit syntax
"SpotPriceLimit": [
{
"PriceLimit": Number,
"InstanceType": String
}
]
SpotPriceLimit properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
PriceLimit | Number | Yes | No | The maximum price for the preemptible instance. | None. |
InstanceType | String | Yes | No | The instance type of the preemptible instance. | None. |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Value | String | Yes | No | The value of the label. | None. |
Key | String | Yes | No | The key of the label. | None. |
Return values
Fn::GetAtt
NodePoolId: the ID of the cluster node pool.
Examples
-
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "TeeConfig": { "Type": "Json", "Description": "The configurations of confidential computing.", "Default": "{\n \"TeeEnable\": true\n}" }, "ClusterId": { "Type": "String", "Description": "Cluster ID.", "Default": "c64ca201b0a4b49agfd****" }, "NodePoolInfo": { "Type": "Json", "Description": "The configurations of the node pool.", "Default": "{\n \"Name\": \"test\"\n}" }, "KubernetesConfig": { "Type": "Json", "Description": "The configurations of the ACK cluster.", "Default": "{\n \"CpuPolicy\": \"static\",\n \"Runtime\": \"containerd\",\n \"CmsEnabled\": true,\n \"UserData\": \"echo 'hello'\",\n \"NodeNameMode\": \"customized,aliyun.com,5,test\",\n \"RuntimeVersion\": \"1.4.8\",\n \"Unschedulable\": false\n}" }, "Count": { "Type": "Number", "Description": "The number of nodes in the node pool.", "Default": 1 }, "Management": { "Type": "Json", "Description": "The configurations of the managed node pool.", "Default": "{\n \"UpgradeConfig\": {\n \"AutoUpgrade\": true,\n \"Surge\": 1,\n \"MaxUnavailable\": 1\n },\n \"AutoRepair\": true,\n \"Enable\": true\n}" }, "ScalingGroup": { "Type": "Json", "Description": "The configurations of the scaling group used by the node pool.", "Default": "{\n \"SpotInstanceRemedy\": true,\n \"Platform\": \"AliyunLinux\",\n \"SystemDiskSize\": 120,\n \"InstanceChargeType\": \"PostPaid\",\n \"SystemDiskPerformanceLevel\": \"PL1\",\n \"ImageId\": \"aliyun_2_1903_x64_20G_alibase_20210726.vhd\",\n \"InstanceTypes\": [\n \"ecs.ebmhfc6.20xlarge\"\n ],\n \"LoginPassword\": \"test****\",\n \"MultiAzPolicy\": \"BALANCE\",\n \"VSwitchIds\": [\n \"vsw-*****\"\n ],\n \"SystemDiskCategory\": \"cloud_essd\",\n \"InternetMaxBandwidthOut\": 0\n}" } }, "Resources": { "ClusterNodePool": { "Type": "ALIYUN::CS::ClusterNodePool", "Properties": { "TeeConfig": { "Ref": "TeeConfig" }, "ClusterId": { "Ref": "ClusterId" }, "NodePoolInfo": { "Ref": "NodePoolInfo" }, "KubernetesConfig": { "Ref": "KubernetesConfig" }, "Count": { "Ref": "Count" }, "Management": { "Ref": "Management" }, "ScalingGroup": { "Ref": "ScalingGroup" } } } }, "Outputs": { "NodePoolId": { "Description": "Cluster node pool ID.", "Value": { "Fn::GetAtt": [ "ClusterNodePool", "NodePoolId" ] } } } }