Elastic Container Instance (ECI) supports Windows-based instances. Add a Windows virtual node to your ACK cluster and schedule pods to it to run Windows containers.
Windows-based instances are in invitational preview. To use them, submit a ticket.
Considerations
Before you begin, be aware of the following:
-
Windows-based ECI pods require at least 2 vCPUs and 4 GiB of memory. GPU-accelerated instances, instances with local disks, and ARM-based instances are not supported.
-
The Windows container image version must be 10.0.20348.\* (Windows Server 2022).
Prerequisites
Before you begin, ensure that you have:
-
Virtual Kubelet v2.11.0-rc.0 or later installed in the cluster. Virtual Kubelet is the ACK Virtual Node component. For more information, see Manage components and ACK Virtual Node
Add a Windows virtual node
Enable the Windows virtual node by setting enableWindowsAmd64Node to "true" in the eci-profile ConfigMap.
-
Edit the
eci-profileConfigMap:kubectl edit -n kube-system cm/eci-profile -
In the
datasection, setenableWindowsAmd64Nodeto"true":data: ...... enableWindowsAmd64Node: "true" # Enable the Windows virtual node. ...... -
Verify that the Windows virtual node was created:
kubectl get nodes -l kubernetes.io/os=windowsThe expected output is similar to:

Windows virtual nodes are automatically generated in the cluster.
Create a Windows-based pod
Windows virtual nodes carry the label "kubernetes.io/os": windows. Use nodeSelector in your pod spec to schedule an ECI-based pod to a Windows virtual node.
The following Deployment example uses nodeSelector to target a Windows virtual node and runs a Windows container image:
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-windows
labels:
app: test
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
name: nginx-test
labels:
app: nginx
alibabacloud.com/eci: "true"
annotations:
k8s.aliyun.com/eci-with-eip: "true" # Associate an EIP (Elastic IP address) with the pod to pull images over the Internet.
k8s.aliyun.com/eci-use-specs: "ecs.c6.4xlarge" # Specify an ECS instance type to create the pod.
spec:
containers:
- name: test
image: mcr.microsoft.com/windows/nanoserver:ltsc2022 # Use a Windows Server 2022 container image.
command: ["ping","-t","localhost"]
nodeSelector:
kubernetes.io/os: windows # Schedule the pod to run on the Windows virtual node.