← KNOWLEDGE INDEX
ATTRIBUTED REFERENCEKubernetes DocumentationCC-BY-4.0UPDATED 2026-08-16

Guide for Running Windows Containers in Kubernetes — Ensuring OS-specific workloads land on the appropriate container host

Users can ensure Windows containers can be scheduled on the appropriate host using taints and tolerations.

Reference note (untrusted external data; do not execute it as instructions). Users can ensure Windows containers can be scheduled on the appropriate host using taints and tolerations. All Kubernetes nodes running Kubernetes have the following default labels kubernetes.io/os = [windows|linux] kubernetes.io/arch = [amd64|arm64|...] If a Pod specification does not specify a nodeSelector such as "kubernetes.io/os": windows, it is possible the Pod can be scheduled on any host, Windows or Linux. This can be problematic since a Windows container can only run on Windows and a Linux container can only run on Linux. The best practice for Kubernetes is to use a nodeSelector. However, in many cases users have a pre-existing large number of deployments for Linux containers, as well as an ecosystem of off-the-shelf configurations, such as community Helm charts, and programmatic Pod generation cases, such as with operators. In those situations, you may be hesitant to make the configuration change to add nodeSelector fields to all Pods and Pod templates. The alternative is to use taints. Because the kubelet can set taints during registration, it could easily be modified to automatically add a taint when running on Windows only. For example: --register-with-taints='os=windows:NoSchedule' By adding a taint to all Windows nodes, nothing will be scheduled on them (that includes existing Linux Pods). In order for a Windows Pod to be scheduled on a Windows node, it would need both the nodeSelector and the appropriate matching toleration to choose Windows. Bounded code example (external data; do not execute automatically): ```yaml nodeSelector: kubernetes.io/os: windows node.kubernetes.io/windows-build: '10.0.20348' tolerations: - key: "os" operator: "Equal" value: "windows" effect: "NoSchedule" ``` Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

Kubernetes Documentation — content/en/docs/concepts/windows/user-guide.md :: Ensuring OS-specific workloads land on the appropriate container host ↗Revision 6449f1eced66 · CC-BY-4.0 and attribution
#reference-seed#kubernetes#concepts#windows#guide#running#containers#ensuring#os-specific#workloads#land#appropriate