Skip to content

Commit 9f50755

Browse files
authored
Merge pull request #32481 from tengqm/IdentifyOS-beta
Promote IdentifyPodOS to Beta
2 parents 55a0710 + 2536593 commit 9f50755

File tree

3 files changed

+49
-33
lines changed

3 files changed

+49
-33
lines changed

content/en/docs/reference/command-line-tools-reference/feature-gates.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ different Kubernetes components.
126126
| `HonorPVReclaimPolicy` | `false` | Alpha | 1.23 | |
127127
| `HPAContainerMetrics` | `false` | Alpha | 1.20 | |
128128
| `HPAScaleToZero` | `false` | Alpha | 1.16 | |
129-
| `IdentifyPodOS` | `false` | Alpha | 1.23 | |
129+
| `IdentifyPodOS` | `false` | Alpha | 1.23 | 1.23 |
130+
| `IdentifyPodOS` | `true` | Beta | 1.24 | |
130131
| `InTreePluginAWSUnregister` | `false` | Alpha | 1.21 | |
131132
| `InTreePluginAzureDiskUnregister` | `false` | Alpha | 1.21 | |
132133
| `InTreePluginAzureFileUnregister` | `false` | Alpha | 1.21 | |

content/en/docs/setup/production-environment/windows/intro-windows-in-kubernetes.md

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -84,35 +84,43 @@ section refers to several key workload enablers and how they map to Windows.
8484
* Named pipe host mounts
8585
* Resource limits
8686
* OS field:
87-
{{< feature-state for_k8s_version="v1.23" state="alpha" >}}
88-
`.spec.os.name` should be set to `windows` to indicate that the current Pod uses Windows containers.
89-
`IdentifyPodOS` feature gate needs to be enabled for this field to be recognized and used by control plane
90-
components and kubelet.
91-
{{< note >}}
92-
If the `IdentifyPodOS` feature gate is enabled and you set the `.spec.os.name` field to `windows`, you must not set the following fields in the `.spec` of that Pod:
93-
* `spec.hostPID`
94-
* `spec.hostIPC`
95-
* `spec.securityContext.seLinuxOptions`
96-
* `spec.securityContext.seccompProfile`
97-
* `spec.securityContext.fsGroup`
98-
* `spec.securityContext.fsGroupChangePolicy`
99-
* `spec.securityContext.sysctls`
100-
* `spec.shareProcessNamespace`
101-
* `spec.securityContext.runAsUser`
102-
* `spec.securityContext.runAsGroup`
103-
* `spec.securityContext.supplementalGroups`
104-
* `spec.containers[*].securityContext.seLinuxOptions`
105-
* `spec.containers[*].securityContext.seccompProfile`
106-
* `spec.containers[*].securityContext.capabilities`
107-
* `spec.containers[*].securityContext.readOnlyRootFilesystem`
108-
* `spec.containers[*].securityContext.privileged`
109-
* `spec.containers[*].securityContext.allowPrivilegeEscalation`
110-
* `spec.containers[*].securityContext.procMount`
111-
* `spec.containers[*].securityContext.runAsUser`
112-
* `spec.containers[*].securityContext.runAsGroup`
113-
114-
Note: In this table, wildcards (*) indicate all elements in a list. For example, spec.containers[*].securityContext refers to the Security Context object for all defined containers. If not, Pod API validation would fail causing admission failures.
115-
{{< /note >}}
87+
88+
The `.spec.os.name` field should be set to `windows` to indicate that the current Pod uses Windows containers.
89+
The `IdentifyPodOS` feature gate needs to be enabled for this field to be recognized and used by control plane
90+
components and kubelet.
91+
92+
{{< note >}}
93+
Starting from 1.24, the `IdentifyPodOS` feature gate is in Beta stage and defaults to be enabled.
94+
{{< /note >}}
95+
96+
If the `IdentifyPodOS` feature gate is enabled and you set the `.spec.os.name` field to `windows`,
97+
you must not set the following fields in the `.spec` of that Pod:
98+
99+
* `spec.hostPID`
100+
* `spec.hostIPC`
101+
* `spec.securityContext.seLinuxOptions`
102+
* `spec.securityContext.seccompProfile`
103+
* `spec.securityContext.fsGroup`
104+
* `spec.securityContext.fsGroupChangePolicy`
105+
* `spec.securityContext.sysctls`
106+
* `spec.shareProcessNamespace`
107+
* `spec.securityContext.runAsUser`
108+
* `spec.securityContext.runAsGroup`
109+
* `spec.securityContext.supplementalGroups`
110+
* `spec.containers[*].securityContext.seLinuxOptions`
111+
* `spec.containers[*].securityContext.seccompProfile`
112+
* `spec.containers[*].securityContext.capabilities`
113+
* `spec.containers[*].securityContext.readOnlyRootFilesystem`
114+
* `spec.containers[*].securityContext.privileged`
115+
* `spec.containers[*].securityContext.allowPrivilegeEscalation`
116+
* `spec.containers[*].securityContext.procMount`
117+
* `spec.containers[*].securityContext.runAsUser`
118+
* `spec.containers[*].securityContext.runAsGroup`
119+
120+
In the above list, wildcards (`*`) indicate all elements in a list.
121+
For example, `spec.containers[*].securityContext` refers to the SecurityContext object
122+
for all containers. If any of these fields is specified, the Pod will
123+
not be admited by the API server.
116124

117125
* [Workload resources](/docs/concepts/workloads/controllers/) including:
118126
* ReplicaSet

content/en/docs/setup/production-environment/windows/user-guide-windows-containers.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,28 @@ Users today need to use some combination of taints and node selectors in order t
160160
keep Linux and Windows workloads on their respective OS-specific nodes.
161161
This likely imposes a burden only on Windows users. The recommended approach is outlined below,
162162
with one of its main goals being that this approach should not break compatibility for existing Linux workloads.
163-
{{< note >}}
163+
164+
164165
If the `IdentifyPodOS` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is
165166
enabled, you can (and should) set `.spec.os.name` for a Pod to indicate the operating system
166167
that the containers in that Pod are designed for. For Pods that run Linux containers, set
167168
`.spec.os.name` to `linux`. For Pods that run Windows containers, set `.spec.os.name`
168169
to Windows.
169170

171+
{{< note >}}
172+
Starting from 1.24, the `IdentifyPodOS` feature is in Beta stage and defaults to be enabled.
173+
{{< /note >}}
174+
170175
The scheduler does not use the value of `.spec.os.name` when assigning Pods to nodes. You should
171176
use normal Kubernetes mechanisms for
172177
[assigning pods to nodes](/docs/concepts/scheduling-eviction/assign-pod-node/)
173178
to ensure that the control plane for your cluster places pods onto nodes that are running the
174179
appropriate operating system.
175-
no effect on the scheduling of the Windows pods, so taints and tolerations and node selectors are still required
180+
181+
The `.spec.os.name` value has no effect on the scheduling of the Windows pods,
182+
so taints and tolerations and node selectors are still required
176183
to ensure that the Windows pods land onto appropriate Windows nodes.
177-
{{< /note >}}
184+
178185
### Ensuring OS-specific workloads land on the appropriate container host
179186

180187
Users can ensure Windows containers can be scheduled on the appropriate host using Taints and Tolerations.

0 commit comments

Comments
 (0)