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
As you deploy workloads, set resource limits on containers. This also subtracts from `NodeAllocatable` and prevents the scheduler from adding more pods once a node is full.
70
+
## CPU management {#resource-management-cpu}
71
+
72
+
Windows can limit the amount of CPU time allocated for different processes but cannot
73
+
guarantee a minimum amount of CPU time.
74
+
75
+
On Windows, the kubelet supports a command-line flag to set the
76
+
[scheduling priority](https://docs.microsoft.com/windows/win32/procthread/scheduling-priorities) of the
77
+
kubelet process: `--windows-priorityclass`. This flag allows the kubelet process to get
78
+
more CPU time slices when compared to other processes running on the Windows host.
79
+
More information on the allowable values and their meaning is available at
When you set memory resource limits for Windows containers, you should either set a limit and leave the memory request unspecified, or set the request equal to the limit.
95
+
## Resource reservation {#resource-reservation}
85
96
86
-
On Windows, good practice to avoid over-provisioning is to configure the kubelet
87
-
with a system reserved memory of at least 2GiB to account for Windows, Kubernetes
88
-
and container runtime overheads.
97
+
To account for memory and CPU used by the operating system, the container runtime, and by
98
+
Kubernetes host processes such as the kubelet, you can (and should) reserve
99
+
memory and CPU resources with the `--kube-reserved` and/or `--system-reserved` kubelet flags.
100
+
On Windows these values are only used to calculate the node's
你可以(且应该)用 `--kube-reserved` 和/或 `--system-reserved` kubelet 标志来预留内存和 CPU 资源。
107
+
在 Windows 上,这些值仅用于计算节点的[可分配](/zh/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)资源。
97
108
98
109
<!--
99
-
## CPU reservations {#resource-management-cpu}
110
+
As you deploy workloads, set resource memory and CPU limits on containers.
111
+
This also subtracts from `NodeAllocatable` and helps the cluster-wide scheduler in determining which pods to place on which nodes.
100
112
101
-
To account for CPU use by the operating system, the container runtime, and by
102
-
Kubernetes host processes such as the kubelet, you can (and should) reserve a
103
-
percentage of total CPU. You should determine this CPU reservation taking account of to the number of CPU cores available on the node. To decide on the CPU percentage to reserve, identify the maximum pod density for each node and monitor the CPU usage of the system services running there, then choose a value that meets your workload needs.
113
+
Scheduling pods without limits may over-provision the Windows nodes and in extreme
114
+
cases can cause the nodes to become unhealthy.
104
115
-->
105
-
## CPU 预留 {#resource-management-cpu}
116
+
{{< caution >}}
117
+
在你部署工作负载时,需对容器设置内存和 CPU 资源的限制。
118
+
这也会从 `NodeAllocatable` 中减去,帮助集群范围的调度器决定哪些 Pod 放到哪些节点上。
106
119
107
-
为了满足操作系统、容器运行时和 kubelet 等 Kubernetes 主机进程的 CPU 使用量,
108
-
你可以(且应该)从 CPU 总量中预留一定百分比。
109
-
你应该根据节点上可用的 CPU 核数来确定这个 CPU 预留量。
110
-
要决定预留的 CPU 百分比,需确定每个节点的最大 Pod 密度,
111
-
并监控节点上运行的系统服务的 CPU 使用量,然后选择一个满足工作负载需求的值。
120
+
若调度 Pod 时未设置限制值,可能对 Windows 节点过量配置资源。
121
+
在极端情况下,这会让节点变得不健康。
122
+
{{< /caution >}}
112
123
113
124
<!--
114
-
You can place bounds on CPU usage for workloads using the
115
-
kubelet parameters `--kubelet-reserve` and/or `--system-reserve` to
116
-
account for CPU usage on the node (outside of containers).
117
-
This reduces `NodeAllocatable`.
118
-
The cluster-wide scheduler then takes this reservation into account when determining pod placement.
119
-
120
-
On Windows, the kubelet supports a command-line flag to set the priority of the
121
-
kubelet process: `--windows-priorityclass`. This flag allows the kubelet process to get more CPU time slices when compared to other processes running on the Windows host.
122
-
More information on the allowable values and their meaning is available at
@@ -666,17 +670,18 @@ If you have what looks like a bug, or you would like to
666
670
make a feature request, please follow the [SIG Windows contributing guide](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#reporting-issues-and-feature-requests) to create a new issue.
667
671
You should first search the list of issues in case it was
668
672
reported previously and comment with your experience on the issue and add additional
669
-
logs. SIG-Windows Slack is also a great avenue to get some initial support and
673
+
logs. SIGWindows channel on the Kubernetes Slack is also a great avenue to get some initial support and
670
674
troubleshooting ideas prior to creating a ticket.
671
675
-->
672
676
### 报告问题和功能请求 {#report-issue-and-feature-request}
673
677
674
678
如果你发现疑似 bug,或者你想提出功能请求,请按照
675
679
[SIG Windows 贡献指南](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#reporting-issues-and-feature-requests)
676
680
新建一个 Issue。
677
-
您应该先搜索 issue 列表,以防之前报告过这个问题,凭你对该问题的经验添加评论,
681
+
你应该先搜索 issue 列表,以防之前报告过这个问题,凭你对该问题的经验添加评论,
678
682
并随附日志信息。
679
-
SIG Windows Slack 也是一个很好的途径,让你在创建工单之前获得一些初始支持和故障排查的思路。
0 commit comments