Node pools enable you to manage groups of node resources in a cluster, such as uniformly managing node labels and taints. If you need to create nodes with Windows as the operating system, you can create Windows node pools in an ACK cluster and upgrade the kubelet, runtime, and operating system image versions at the node pool level.
Limits
The following table describes the limits on creating Windows node pools.
Limit | Description |
Cluster |
|
Container runtime | Only containerd 1.6 and later versions support Windows node pools. To upgrade the runtime version, see Upgrade a node pool. |
The type of the node pool | Only non-managed node pools can be created as Windows node pools. |
The instance type |
|
The following table describes the limits on using Windows node pools.
Limit | Description |
Operating system | Windows node pools support Windows Server 2019, Windows Server 2022, and Windows Server Core, Version 2022 as operating systems. Note The ACK console supports selecting Windows Server 2019, Windows Server 2022, and Windows Server Core, Version 2022. If you need to use Windows Server Core, Version 2004, select the latest image ID based on the ECS public image release records to create a node pool. For more information, see 2023 public image release records. |
Number of nodes | By default, you can deploy at most 100 nodes in a cluster. If you need to add more nodes, submit a request on the Quota Management page. |
Server | When you add existing servers, make sure that the Elastic Compute Service (ECS) instances in your virtual private cloud (VPC) are attached to elastic IP addresses (EIPs) or a NAT gateway is configured for the VPC. Make sure that the nodes can access the Internet. Otherwise, the servers cannot be added. For more information about the precautions and procedure for adding existing ECS instances, see Add existing nodes. |
Create a Windows node pool
Console
You cannot create the default node pool (default-nodepool) as a Windows node pool. See the Limits section above and create a Windows node pool after creating a cluster.
Log on to the ACK console. In the navigation pane on the left, click Clusters.
On the Clusters page, find the cluster to manage and click its name. In the left-side navigation pane, choose .
In the upper-right corner of the Node Pools page, click Create Node Pool, configure the parameters, and then click Confirm Order.
For more information about the parameters, see Create and manage node pools. The following table describes some of the parameters.
Parameter
Description
Managed Node Pool
Select not to enable this feature.
Container Runtime
Select containerd.
Instance Type
Some instance types do not support Windows node pools. When you create a Windows node pool, only the instance types that support Windows node pools can be selected. For example, you can select the ecs.g6.xlarge instance type when you create a Windows node pool.
Select an instance type with at least 4 vCPUs and 8 GB of memory.
Select non-GPU-accelerated instance types.
For more information about instance types, see Instance families.
Expected Number of Nodes
The number of nodes that you want the node pool to maintain. After you specify the desired size, the node pool automatically scales in or out to maintain the specified number of nodes.
Operating System
Select the Windows operating system.
ECS Tags
Add labels to the Elastic Compute Service (ECS) instances.
Node Labels
The labels that you want to add to the nodes in the node pool.
On the Node Pools page, when the Status of the node pool is Ready, the Windows node pool is created.
API
You can call the CreateClusterNodePool operation to create a Windows node pool and configure parameters such as the number of nodes and instance types. The following example shows the parameters:
{
"ClusterId": "ca8ed83XXXXXXXXXXXX5ec197", // The ID of the cluster.
"body": {
"nodepool_info": {
"name": "nodepool-fXXXXXx", // The name of the node pool.
"resource_group_id": "rg-acfmXXXXXXXXsjpq" // The ID of the resource group to which the cluster belongs. This parameter is used to isolate different resources.
},
"scaling_group": {
"vswitch_ids": [ // The vSwitches where the nodes of the cluster are deployed. This parameter is required when you create a managed cluster without nodes.
"vsw-bp1XXXXXXXXXXXXX1xm84",
"vsw-bp1XXXXXXXXXXXX2v6x0a",
"vsw-bp1XXXXXXXXXXXXXjkxbo"
],
"data_disks": [ // The configurations of the data disks attached to the worker nodes, such as the disk type and disk size.
{
"category": "cloud_essd",
"size": 120,
"encrypted": "false",
"performance_level": "PL0"
}
],
"vpc_id": "vpc-bpXXXXXXXXXXXXXXXmgb6", // The ID of the VPC where the cluster is deployed.
"instance_charge_type": "PostPaid", // The billing method of the nodes. Valid values: PrePaid: subscription. PostPaid: pay-as-you-go. Default value: PostPaid.
"internet_max_bandwidth_out": 1, // The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Valid values: 1 to 100.
"soc_enabled": false, // Specifies whether to enable MLPS security hardening. Valid values: true: enables MLPS security hardening. false: disables MLPS security hardening.
"security_hardening_os": false, // Specifies whether to enable security hardening for the operating system. Valid values: true: enables security hardening. false: disables security hardening. Default value: false.
"instance_types": [ // The instance types.
"ecs.n2.large"
],
"instance_patterns": [ // The instance configurations.
{
"Cores": 4,
"Memory": 16,
"burst_performance_option": "Exclude", // Specifies whether the instance type is a burstable instance type.
"excluded_instance_types": [ // The instance types that you want to exclude.
"ecs.c6t.*"
// ...
],
"instance_type_families": [ // The instance families that you want to specify.
"ecs.g6"
// ...
]
}
],
"login_password": "XXXXXX",
"login_as_non_root": false,
"system_disk_category": "cloud_essd",
"system_disk_size": 40,
"system_disk_performance_level": "PL0",
"system_disk_encrypted": false,
"multi_az_policy": "BALANCE", // The scaling policy for the multi-zone scaling group.
"platform": "WindowsServer2022",
"image_id": "win2022_21H2_x64_dtc_en-us_40G_container_alibase_20240220.vhd",
"image_type": "WindowsServer2022",
"desired_size": 1
},
"kubernetes_config": { // The configurations of the cluster.
"cms_enabled": true, // Specifies whether to install the CloudMonitor agent on ECS nodes. After the CloudMonitor agent is installed, you can view monitoring information about the ECS instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent.
"unschedulable": false, // Specifies whether to set the nodes that are added to the node pool as unschedulable. Valid values: true: The nodes are unschedulable after a scale-out activity is performed. false: The nodes are schedulable after a scale-out activity is performed.
"runtime": "containerd",
"runtime_version": "2.1.1" // Only containerd 1.6 and later versions support Windows node pools.
},
"auto_scaling": { // The configurations of auto scaling for the node pool. Valid values: true: enables auto scaling for the node pool. false: disables auto scaling.
"enable": false
},
"tee_config": { // The configurations of confidential computing for the node pool. Valid values: true: enables confidential computing for the cluster. false: does not enable confidential computing for the cluster.
"tee_enable": false
},
"node_config": { // The configurations of the nodes.
"image_acceleration_config": {
"enable_image_acceleration": false
}
}
}
}
Terraform
You can refer to the Terraform overview document to create a Windows node pool and configure parameters such as the number of nodes and instance types. The following example shows the parameters:
provider "alicloud" {
region = "cn-hangzhou"
}
resource "alicloud_cs_kubernetes_node_pool" "pool" {
tee_config {
tee_enable = false
}
runtime_version = "2.1.1" // The container runtime version. Only containerd 1.6 and later versions support Windows node pools.
resource_group_id = "rg-acXXXXXXXjpq"
multi_az_policy = "BALANCE"
node_pool_name = "nodepool-fqLfdx"
login_as_non_root = false
runtime_name = "containerd"
cluster_id = "ca8ed83XXXXXXXXXXXXXXXXa55ec197"
password = "XXXXXXX"
data_disks {
size = 120
encrypted = "false"
performance_level = "PL0"
category = "cloud_essd"
}
instance_charge_type = "PostPaid" // The billing method of the nodes. Valid values: PrePaid: subscription. PostPaid: pay-as-you-go. Default value: PostPaid.
desired_size = 1
unschedulable = false
scaling_config {
enable = false
}
image_type = "WindowsServer"
vswitch_ids = [
"vsw-bp1XXXXXXXXXXXXXXXX84",
"vsw-bp1XXXXXXXXXXXXXXXX0a",
"vsw-bp1XXXXXXXXXXXXXXXXXo"
]
instance_types = [ // The instance types. The instance types of nodes in the node pool. When the system adds a node to the node pool, the system selects the most appropriate one from the specified instance types for the node.
"ecs.g6.large"
]
soc_enabled = false // Specifies whether to enable MLPS security hardening. Valid values: true: enables MLPS security hardening. false: disables MLPS security hardening.
internet_max_bandwidth_out = 1 // The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Valid values: 1 to 100.
system_disk_encrypted = false // Specifies whether to encrypt the system disk. Valid values: true: The system disk is encrypted. false: The system disk is not encrypted.
system_disk_size = 40
install_cloud_monitor = true
system_disk_category = "cloud_essd"
system_disk_performance_level = "PL0"
image_id = "win2022_21H2_x64_dtc_en-us_40G_container_alibase_20240220.vhd"
security_hardening_os = false
}
Upgrade a Windows node pool
During a node pool update, the kubelet and container runtime are updated. Before you upgrade a node pool, make sure that you have upgraded the control plane to the target version.
kubelet: Update the kubelet on all nodes in a node pool to the same version as the control plane.
Container runtime: If a new container runtime version is available, you can update the container runtime of the nodes in a node pool to the new version.
You can refer to Upgrade a node pool to learn about the precautions and operation entry for the upgrade. When configuring the upgrade method, Windows node pools must be upgraded by replacing the system disk of the node.
Upgrade the operating system image of a Windows node pool
You can refer to Replace the operating system to upgrade the operating system image of a node pool to the latest version to benefit from new features, optimizations, and bug fixes.
You can refer to Operating systems to learn about the latest image versions.
References
You can refer to Create a Windows application to deploy applications on Windows nodes.
If your business has unpredictable traffic spikes and requires Windows nodes, we recommend that you use Windows virtual nodes and schedule pods to these virtual nodes. For more information, see (Invitational preview) Schedule pods to Windows virtual nodes.