@@ -127,17 +127,19 @@ the name should follow the more restrictive rules for a
127
127
{{< feature-state state="stable" for_k8s_version="v1.25" >}}
128
128
129
129
You should set the ` .spec.os.name ` field to either ` windows ` or ` linux ` to indicate the OS on
130
- which you want the pod to run. These two are the only operating systems supported for now by
131
- Kubernetes. In future, this list may be expanded.
132
-
133
- In Kubernetes v{{< skew currentVersion >}}, the value you set for this field has no
134
- effect on {{< glossary_tooltip text="scheduling" term_id="kube-scheduler" >}} of the pods.
135
- Setting the ` .spec.os.name ` helps to identify the pod OS
136
- authoritatively and is used for validation. The kubelet refuses to run a Pod where you have
137
- specified a Pod OS, if this isn't the same as the operating system for the node where
138
- that kubelet is running.
130
+ which you want the pod to run. These two are the only operating systems supported for now by
131
+ Kubernetes. In the future, this list may be expanded.
132
+
133
+ In Kubernetes v{{< skew currentVersion >}}, the value of ` .spec.os.name ` does not affect
134
+ how the {{< glossary_tooltip text="kube-scheduler" term_id="kube-scheduler" >}}
135
+ picks a Pod to run a node. In any cluster where there is more than one operating system for
136
+ running nodes, you should set the
137
+ [ kubernetes.io/os] ( /docs/reference/labels-annotations-taints/#kubernetes-io-os )
138
+ label correctly on each node, and define pods with a ` nodeSelector ` based on the operating system
139
+ label, the kube-scheduler assigns your pod to a node based on other criteria and may or may not
140
+ succeed in picking a suitable node placement where the node OS is right for the containers in that Pod.
139
141
The [ Pod security standards] ( /docs/concepts/security/pod-security-standards/ ) also use this
140
- field to avoid enforcing policies that aren't relevant to that operating system.
142
+ field to avoid enforcing policies that aren't relevant to the operating system.
141
143
142
144
### Pods and controllers
143
145
0 commit comments