Use ALIYUN::CS::ClusterNodePool to create a node pool for a 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 | Update allowed | Description | Constraints |
ClusterId | String | Yes | No | The cluster ID. | You can call the DescribeClustersV1 operation to query the cluster ID. |
ScalingGroup | Map | Yes | Yes | The configurations of the scaling group for the node pool. | You can call the DescribeClusterNodePools operation to query the configurations of the scaling group for the node pool. For more information, see ScalingGroup syntax and ScalingGroup properties. |
AutoScaling | Map | No | No | The auto scaling configurations. | For more information, see AutoScaling syntax and AutoScaling properties. |
Count | Integer | No | Yes | The number of nodes in the node pool. | None |
KubernetesConfig | Map | No | Yes | Cluster configuration | For more information, see KubernetesConfig syntax and KubernetesConfig properties. |
Management | Map | No | No | The configurations of the managed node pool. | For more information, see Management syntax and Management properties. |
NodePoolInfo | Map | No | No | The configurations of the node pool. | For more information, see NodePoolInfo syntax and NodePoolInfo properties. |
TeeConfig | Map | No | No | The configurations of the Kubernetes cluster for confidential computing. | For more information, see TeeConfig syntax and TeeConfig properties. |
TeeConfig syntax
"TeeConfig": {
"TeeEnable": Boolean
}TeeConfig properties
Property | Type | Required | Update allowed | Description | Constraints |
TeeEnable | Boolean | Yes | No | Specifies whether to enable the Kubernetes cluster for confidential computing. | Valid values:
|
NodePoolInfo syntax
"NodePoolInfo": {
"ResourceGroupId": String,
"Name": String
}NodePoolInfo properties
Property | Type | Required | Update allowed | Description | Constraints |
Name | String | Yes | No | The name of the node pool. | None |
ResourceGroupId | String | No | No | The ID of the resource group to which the node pool belongs. | 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 | Update allowed | Description | Constraints |
Runtime | String | Yes | Yes | The name of the container runtime. | None |
RuntimeVersion | String | Yes | Yes | The version of the container runtime. | None |
CpuPolicy | String | No | Yes | The CPU management policy for the nodes. | If the cluster version is 1.12.6 or later, the following policies are supported:
|
CmsEnabled | Boolean | No | Yes | Specifies whether to install CloudMonitor on ECS nodes. | After you install CloudMonitor, you can view monitoring information about the created ECS instances in the CloudMonitor console. We recommend that you enable this feature. Valid values:
|
NodeNameMode | String | No | No | The custom node name. | A node name consists of three parts: a prefix, a substring of the node's IP address, and a suffix.
|
Labels | List | No | Yes | The node labels. Add labels to the nodes of the Kubernetes cluster. | For more information, see Labels syntax and Labels properties. |
UserData | String | No | Yes | The custom data of the node. | None |
Unschedulable | Boolean | No | Yes | Specifies whether to set the newly added nodes to unschedulable. | Valid values:
|
Taints | List | No | No | The taint configurations. | For more information, see Taints syntax and Taints properties. |
Labels syntax
"Labels": [
{
"Value": String,
"Key": String
}
]Labels properties
Property | Type | Required | Update allowed | Description | Constraints |
Value | String | Yes | Yes | The tag value. | None |
Key | String | Yes | Yes | The tag key. | None |
Taints syntax
"Taints": [
{
"Value": String,
"Effect": String,
"Key": String
}
]Taints properties
Property | Type | Required | Update allowed | Description | Constraints |
Value | String | Yes | No | The value of the taint. | None |
Key | String | Yes | No | The name of the taint. | None |
Effect | String | No | No | The scheduling policy. | Valid values:
|
Management syntax
"Management": {
"UpgradeConfig": Map,
"AutoRepair": Boolean,
"Enable": Boolean
}Management properties
Property | Type | Required | Update allowed | Description | Constraints |
Enable | Boolean | Yes | No | Specifies whether to enable the managed node pool. | Valid values:
|
AutoRepair | Boolean | No | No | Specifies whether to enable auto repair. | This parameter takes effect only when Enable is set to true. Valid values:
|
UpgradeConfig | Map | No | No | The auto-upgrade configurations. | This property takes effect only when Enable is set to true. For more information, see UpgradeConfig syntax and UpgradeConfig properties. |
UpgradeConfig syntax
"UpgradeConfig": {
"AutoUpgrade": Boolean,
"SurgePercentage": Integer,
"Surge": Integer,
"MaxUnavailable": Integer
}UpgradeConfig properties
Property | Type | Required | Update allowed | Description | Constraints |
AutoUpgrade | Boolean | No | No | Specifies whether to enable auto-upgrade. | Valid values:
|
SurgePercentage | Integer | No | No | The proportion of extra nodes. | You can specify only one of SurgePercentage and Surge. |
Surge | Integer | No | No | The number of extra nodes. | You can specify only one of SurgePercentage and Surge. |
MaxUnavailable | Integer | No | No | The maximum number of unavailable nodes. | 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 | Update allowed | Description | Constraints |
Enable | Boolean | Yes | No | Specifies whether to enable auto scaling. | Valid values:
|
EipBandwidth | Integer | No | No | The peak bandwidth of the EIP. | None |
EipInternetChargeType | String | No | No | The billing method of the EIP. | Valid values:
|
IsBondEip | Boolean | No | No | Specifies whether to associate an EIP. | Valid values:
|
MinInstances | Integer | No | No | The minimum number of instances in the scaling group. | None |
MaxInstances | Integer | No | No | The maximum number of instances in the scaling group. | None |
Type | String | No | No | The type of auto scaling. | Valid values (by auto scaling instance type):
|
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,
"SocEnabled": Boolean,
"ImageType": String,
"InstancePatterns": List,
"SecurityHardeningOs": Boolean
}ScalingGroup properties
Property | Type | Required | Update allowed | Description | Constraints |
InstanceTypes | List | No | Yes | Types of spot instances. | None |
SystemDiskSize | Integer | Yes | Yes | The size of the system disk for the nodes. | Unit: GiB. Valid values: 40 to 500. |
VSwitchIds | List | Yes | Yes | The vSwitch IDs. | None |
AutoRenew | Boolean | No | Yes | Specifies whether to enable auto-renewal for the nodes in the node pool. | This parameter takes effect only when InstanceChargeType is set to PrePaid. Valid values:
|
AutoRenewPeriod | Integer | No | Yes | The auto-renewal period for the nodes in the node pool. | This parameter is required and takes effect only when InstanceChargeType is set to PrePaid and AutoRenew is set to true. If PeriodUnit is set to Month, valid values are:
|
CompensateWithOnDemand | Boolean | No | Yes | If MultiAzPolicy is set to COST_OPTIMIZED, this parameter specifies whether to allow the system to automatically create pay-as-you-go instances to meet the required number of ECS instances when spot instances cannot be created due to price or inventory issues. | Valid values:
|
DataDisks | List | No | Yes | The data disk configurations for the nodes in the node pool. | For more information, see DataDisks syntax and DataDisks properties. |
InstanceChargeType | String | No | Yes | The billing method of the nodes in the node pool. | Valid values:
|
ImageId | String | No | Yes | The ID of the custom image. | By default, the system-provided image is used. |
OnDemandPercentageAboveBaseCapacity | Integer | No | Yes | After the scaling group meets the OnDemandBaseCapacity requirement, this parameter specifies the percentage of pay-as-you-go instances among the excess instances. | Valid values: 0 to 100. |
OnDemandBaseCapacity | Integer | No | Yes | The minimum number of pay-as-you-go instances required by the scaling group. | Valid values: 0 to 1000. If the number of pay-as-you-go instances is less than this value, pay-as-you-go instances are created first. |
Platform | String | No | Yes | The operating system. | Valid values:
|
Period | Integer | No | Yes | The auto-renewal period for the nodes in the node pool. This parameter is required and takes effect only when you select the subscription billing method and enable auto-renewal. | If PeriodUnit is set to Month, valid values are:
|
PeriodUnit | String | No | Yes | The billing cycle of the nodes in the node pool. | You must specify a billing cycle when InstanceChargeType is set to PrePaid. Valid values:
|
LoginPassword | String | No | Yes | The SSH logon password. | You can specify only one of KeyPair and LoginPassword. 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 |
MultiAzPolicy | String | No | Yes | The scale-out and scale-in policy for ECS instances in a multi-zone scaling group. | Valid values:
|
KeyPair | String | No | Yes | The name of the key pair for password-free logon. | You can specify only one of KeyPair and LoginPassword. Note If you create a managed node pool, only KeyPair is supported. |
SecurityGroupId | String | No | Yes | The security group ID. | None |
SpotInstanceRemedy | Boolean | No | Yes | Specifies whether to use spot instances. | Valid values:
For more information, see Use spot instances. |
SystemDiskPerformanceLevel | String | No | Yes | The performance level of the system disk. | Valid values:
For more information, see ESSDs. |
SpotStrategy | String | No | Yes | Spot instance type | Valid values:
For more information, see Use spot instances. |
SpotPriceLimit | List | No | Yes | The maximum hourly price for the instance. | The value can have up to three decimal places. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit. For more information, see SpotPriceLimit syntax and SpotPriceLimit properties. |
SpotInstancePools | Integer | No | Yes | The number of available instance types. The scaling group creates spot instances of multiple instance types that are provided at the lowest cost in a balanced manner. | Valid values: 1 to 10. |
ScalingPolicy | String | No | Yes | The mode of the scaling group. | Valid values:
|
SystemDiskCategory | String | No | Yes | The type of the system disk for the nodes. | Valid values:
|
InternetChargeType | String | No | Yes | The billing method for the public bandwidth. | Valid values:
|
InternetMaxBandwidthOut | Integer | No | Yes | The maximum outbound public bandwidth. | Unit: Mbit/s. Valid values: 1 to 100. |
RdsInstances | List | No | Yes | The RDS instance IDs. | None |
Tags | List | No | Yes | The tags to add only to the ECS instances. | Tag keys cannot be repeated. The maximum length is 128 characters. Tag keys and tag values cannot start with For more information, see Tags syntax and Tags properties. |
ZoneIds | List | No | Yes | The list of zone IDs. | None |
SocEnabled | Boolean | No | No | Specifies whether to enable Multi-Level Protection Scheme (MLPS) security hardening. | None |
ImageType | String | No | No | The type of the operating system image. | You must specify this parameter or the Platform parameter. |
InstancePatterns | List | No | Yes | The instance attribute configurations. | For more information, see InstancePatterns properties. |
SecurityHardeningOs | Boolean | No | No | Alibaba Cloud OS security hardening. | Valid values:
Default value: |
InstancePatterns syntax
"InstancePatterns": [
{
"CpuArchitectures": List,
"MaxCpuCores": Integer,
"MinMemorySize": Integer,
"Memory": Integer,
"InstanceFamilyLevel": String,
"MinCpuCores": Integer,
"Cores": Integer,
"InstanceTypeFamilies": List,
"InstanceCategories": List,
"ExcludedInstanceTypes": List,
"MaxMemorySize": Integer
}
]InstancePatterns properties
Property | Type | Required | Update allowed | Description | Constraints |
CpuArchitectures | List | No | No | The CPU architecture of the instance. | Valid values:
|
MaxCpuCores | Integer | No | No | The maximum number of vCPU cores for the instance type. | None |
MinMemorySize | Integer | No | No | The minimum memory size of the instance type. | Unit: GiB. |
Memory | Integer | No | No | The memory size of the instance type. | Unit: GiB. |
InstanceFamilyLevel | String | No | No | The level of the instance family. | None |
MinCpuCores | Integer | No | No | The minimum number of vCPU cores for the instance type. | None |
Cores | Integer | No | No | The number of vCPU cores for the instance type. | None |
InstanceTypeFamilies | List | No | No | The specified instance families. | None |
InstanceCategories | List | No | No | The instance categories. | None |
ExcludedInstanceTypes | List | No | No | The instance types to exclude. | None |
MaxMemorySize | Integer | No | No | The maximum memory size of the instance type. | Unit: GiB. |
DataDisks syntax
"DataDisks": [
{
"Category": String,
"Encrypted": Boolean,
"PerformanceLevel": String,
"Size": Integer,
"AutoSnapshotPolicyId": String,
"Categories": List
}
]DataDisks properties
Property | Type | Required | Update allowed | Description | Constraints |
AutoSnapshotPolicyId | String | No | Yes | The ID of the automatic snapshot policy. The disk is automatically backed up based on this policy. | The default value is empty, which indicates that no automatic backup is performed. |
Category | String | No | Yes | The type of the data disk. | Valid values:
|
Encrypted | Boolean | No | Yes | Specifies whether to encrypt the data disk. | Valid values:
|
PerformanceLevel | String | No | Yes | The performance level of the disk. | Valid values:
For more information, see ESSDs. |
Size | Integer | No | Yes | The size of the data disk. | Valid values: 40 to 32768. Valid values: 40 to 32768. Default value: 120. Unit: GiB. |
Categories | List | No | No | The list of data disk types. | None |
SpotPriceLimit syntax
"SpotPriceLimit": [
{
"PriceLimit": Number,
"InstanceType": String
}
]SpotPriceLimit properties
Property | Type | Required | Update allowed | Description | Constraints |
PriceLimit | Number | Yes | Yes | The price limit for the spot instance. | None |
InstanceType | String | Yes | Yes | The instance type of the spot instance. | None |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]Tags properties
Property | Type | Required | Update allowed | Description | Constraints |
Value | String | Yes | Yes | The tag value. | None |
Key | String | Yes | Yes | The tag key. | None |
Return value
Fn::GetAtt
NodePoolId: The ID of the node pool.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TeeConfig:
Type: Json
Description: The configurations of confidential computing.
Default: |-
{
"TeeEnable": true
}
ClusterId:
Type: String
Description: Cluster ID.
Default: c64ca201b0a4b49agfd****
NodePoolInfo:
Type: Json
Description: The configurations of the node pool.
Default: |-
{
"Name": "test"
}
KubernetesConfig:
Type: Json
Description: The configurations of the ACK cluster.
Default: |-
{
"CpuPolicy": "static",
"Runtime": "containerd",
"CmsEnabled": true,
"UserData": "echo 'hello'",
"NodeNameMode": "customized,aliyun.com,5,test",
"RuntimeVersion": "1.4.8",
"Unschedulable": false
}
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: |-
{
"UpgradeConfig": {
"AutoUpgrade": true,
"Surge": 1,
"MaxUnavailable": 1
},
"AutoRepair": true,
"Enable": true
}
ScalingGroup:
Type: Json
Description: The configurations of the scaling group used by the node pool.
Default: |-
{
"SpotInstanceRemedy": true,
"Platform": "AliyunLinux",
"SystemDiskSize": 120,
"InstanceChargeType": "PostPaid",
"SystemDiskPerformanceLevel": "PL1",
"ImageId": "aliyun_2_1903_x64_20G_alibase_20210726.vhd",
"InstanceTypes": [
"ecs.ebmhfc6.20xlarge"
],
"LoginPassword": "test****",
"MultiAzPolicy": "BALANCE",
"VSwitchIds": [
"vsw-*****"
],
"SystemDiskCategory": "cloud_essd",
"InternetMaxBandwidthOut": 0
}
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
{
"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"
]
}
}
}
}