You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/setup/production-environment/windows/intro-windows-in-kubernetes.md
+24-17Lines changed: 24 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,39 +233,42 @@ Overlay (VXLAN) networks on Windows do not support dual-stack networking today.
233
233
234
234
### Limitations
235
235
236
-
#### Control Plane
237
-
238
236
Windows is only supported as a worker node in the Kubernetes architecture and component matrix. This means that a Kubernetes cluster must always include Linux master nodes, zero or more Linux worker nodes, and zero or more Windows worker nodes.
239
237
240
-
#### Compute {#compute-limitations}
241
238
242
-
#####Resource management and process isolation
239
+
#### Resource Handling
243
240
244
241
Linux cgroups are used as a pod boundary for resource controls in Linux. Containers are created within that boundary for network, process and file system isolation. The cgroups APIs can be used to gather cpu/io/memory stats. In contrast, Windows uses a Job object per container with a system namespace filter to contain all processes in a container and provide logical isolation from the host. There is no way to run a Windows container without the namespace filtering in place. This means that system privileges cannot be asserted in the context of the host, and thus privileged containers are not available on Windows. Containers cannot assume an identity from the host because the Security Account Manager (SAM) is separate.
245
242
246
-
##### Operating System Restrictions
243
+
####Resource Reservations
247
244
248
-
Windows has strict compatibility rules, where the host OS version must match the container base image OS version. Only Windows containers with a container operating system of Windows Server 2019 are supported. Hyper-V isolation of containers, enabling some backward compatibility of Windows container image versions, is planned for a future release.
245
+
##### Memory Reservations
246
+
Windows does not have an out-of-memory process killer as Linux does. Windows always treats all user-mode memory allocations as virtual, and pagefiles are mandatory. The net effect is that Windows won't reach out of memory conditions the same way Linux does, and processes page to disk instead of being subject to out of memory (OOM) termination. If memory is over-provisioned and all physical memory is exhausted, then paging can slow down performance.
247
+
248
+
Keeping memory usage within reasonable bounds is possible using the kubelet parameters `--kubelet-reserve` and/or `--system-reserve` to account for memory usage on the node (outside of containers). This reduces [NodeAllocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).
249
+
250
+
{{< note >}}
251
+
As you deploy workloads, use resource limits (must set only limits or limits must equal requests) on containers. This also subtracts from NodeAllocatable and prevents the scheduler from adding more pods once a node is full.
252
+
{{< /note >}}
253
+
254
+
A best practice to avoid over-provisioning is to configure the kubelet with a system reserved memory of at least 2GB to account for Windows, Docker, and Kubernetes processes.
255
+
256
+
##### CPU Reservations
257
+
To account for Windows, Docker and other Kubernetes host processes it is recommended to reserve a percentage of CPU so they are able to respond to events. This value needs to be scaled based on the number of CPU cores available on the Windows node.To determine this percentage a user should identify the maximum pod density for each of their nodes and monitor the CPU usage of the system services choosing a value that meets their workload needs.
249
258
250
-
##### Feature Restrictions
259
+
Keeping CPU usage within reasonable bounds is possible using the kubelet parameters `--kubelet-reserve` and/or `--system-reserve` to account for CPU usage on the node (outside of containers). This reduces [NodeAllocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).
251
260
252
-
* TerminationGracePeriod: requires CRI-containerD
261
+
#### Feature Restrictions
262
+
* TerminationGracePeriod: not implemented
253
263
* Single file mapping: to be implemented with CRI-ContainerD
254
264
* Termination message: to be implemented with CRI-ContainerD
255
265
* Privileged Containers: not currently supported in Windows containers
256
266
* HugePages: not currently supported in Windows containers
257
267
* The existing node problem detector is Linux-only and requires privileged containers. In general, we don't expect this to be used on Windows because privileged containers are not supported
258
268
* Not all features of shared namespaces are supported (see API section for more details)
259
269
260
-
##### Memory Reservations and Handling
261
-
262
-
Windows does not have an out-of-memory process killer as Linux does. Windows always treats all user-mode memory allocations as virtual, and pagefiles are mandatory. The net effect is that Windows won't reach out of memory conditions the same way Linux does, and processes page to disk instead of being subject to out of memory (OOM) termination. If memory is over-provisioned and all physical memory is exhausted, then paging can slow down performance.
263
-
264
-
Keeping memory usage within reasonable bounds is possible with a two-step process. First, use the kubelet parameters `--kubelet-reserve` and/or `--system-reserve` to account for memory usage on the node (outside of containers). This reduces [NodeAllocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)). As you deploy workloads, use resource limits (must set only limits or limits must equal requests) on containers. This also subtracts from NodeAllocatable and prevents the scheduler from adding more pods once a node is full.
265
-
266
-
A best practice to avoid over-provisioning is to configure the kubelet with a system reserved memory of at least 2GB to account for Windows, Docker, and Kubernetes processes.
267
-
268
-
The behavior of the flags behave differently as described below:
270
+
#### Difference in behavior of flags when compared to Linux
271
+
The behavior of the following kubelet flags is different on Windows nodes as described below:
269
272
270
273
*`--kubelet-reserve`, `--system-reserve` , and `--eviction-hard` flags update Node Allocatable
271
274
* Eviction by using `--enforce-node-allocable` is not implemented
@@ -413,6 +416,10 @@ None of the PodSecurityContext fields work on Windows. They're listed here for r
413
416
* V1.PodSecurityContext.SupplementalGroups - provides GID, not available on Windows
414
417
* V1.PodSecurityContext.Sysctls - these are part of the Linux sysctl interface. There's no equivalent on Windows.
415
418
419
+
#### Operating System Version Restrictions
420
+
421
+
Windows has strict compatibility rules, where the host OS version must match the container base image OS version. Only Windows containers with a container operating system of Windows Server 2019 are supported. Hyper-V isolation of containers, enabling some backward compatibility of Windows container image versions, is planned for a future release.
422
+
416
423
## Getting Help and Troubleshooting {#troubleshooting}
417
424
418
425
Your main source of help for troubleshooting your Kubernetes cluster should start with this [section](/docs/tasks/debug-application-cluster/troubleshooting/). Some additional, Windows-specific troubleshooting help is included in this section. Logs are an important element of troubleshooting issues in Kubernetes. Make sure to include them any time you seek troubleshooting assistance from other contributors. Follow the instructions in the SIG-Windows [contributing guide on gathering logs](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#gathering-logs).
0 commit comments