Skip to content

Commit c885404

Browse files
authored
Merge pull request #45845 from mrgiles/38843_pod_os_spec_description
Update Pod OS description spec.os.name
2 parents e7896c2 + eb19a43 commit c885404

File tree

1 file changed

+12
-10
lines changed
  • content/en/docs/concepts/workloads/pods

1 file changed

+12
-10
lines changed

content/en/docs/concepts/workloads/pods/_index.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,19 @@ the name should follow the more restrictive rules for a
127127
{{< feature-state state="stable" for_k8s_version="v1.25" >}}
128128

129129
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.
139141
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.
141143

142144
### Pods and controllers
143145

0 commit comments

Comments
 (0)