Skip to content

Commit afc8753

Browse files
committed
[zh] Sync node/kubelet-files.md and kernel-version-requirements.md
1 parent 7ab46e4 commit afc8753

File tree

2 files changed

+86
-22
lines changed

2 files changed

+86
-22
lines changed

content/zh-cn/docs/reference/node/kernel-version-requirements.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ to older kernel releases (retaining the older kernel version).
2222
然而,单纯依赖内核版本号可能不足以满足某些操作系统发行版,
2323
因为像 RHEL、Ubuntu 和 SUSE 等发行版的维护者们通常会将选定的特性反向移植到较旧的内核版本(保留较旧的内核版本)。
2424

25+
<!--
2526
## Pod sysctls
27+
-->
28+
## Pod sysctl {#pod-sysctls}
2629

2730
<!--
2831
On Linux, the `sysctl()` system call configures kernel parameters at run time. There is a command
@@ -59,15 +62,15 @@ Code: https://github.com/kubernetes/kubernetes/blob/00236ae0d73d2455a2470469ed10
5962
6063
### kube proxy `nftables` proxy mode
6164
-->
62-
- `net.ipv4.ip_local_reserved_ports`(自 Kubernetes 1.27 起,需要内核 3.16+)
63-
- `net.ipv4.tcp_keepalive_time`(自 Kubernetes 1.29 起,需要内核 4.5+)
64-
- `net.ipv4.tcp_fin_timeout`(自 Kubernetes 1.29 起,需要内核 4.6+)
65-
- `net.ipv4.tcp_keepalive_intvl`(自 Kubernetes 1.29 起,需要内核 4.5+)
66-
- `net.ipv4.tcp_keepalive_probes`(自 Kubernetes 1.29 起,需要内核 4.5+)
65+
- `net.ipv4.ip_local_reserved_ports`(自 Kubernetes 1.27 起,需要内核 3.16+)
66+
- `net.ipv4.tcp_keepalive_time`(自 Kubernetes 1.29 起,需要内核 4.5+)
67+
- `net.ipv4.tcp_fin_timeout`(自 Kubernetes 1.29 起,需要内核 4.6+)
68+
- `net.ipv4.tcp_keepalive_intvl`(自 Kubernetes 1.29 起,需要内核 4.5+)
69+
- `net.ipv4.tcp_keepalive_probes`(自 Kubernetes 1.29 起,需要内核 4.5+)
6770
- `net.ipv4.tcp_syncookies`(自内核 4.6+ 添加了命名空间作用域)。
6871
- `net.ipv4.tcp_rmem`(自 Kubernetes 1.32,需要内核 4.15+)。
6972
- `net.ipv4.tcp_wmem`(自 Kubernetes 1.32,需要内核 4.15+)。
70-
- `net.ipv4.vs.conn_reuse_mode`(用于 `ipvs` 代理模式,需要内核 4.1+)
73+
- `net.ipv4.vs.conn_reuse_mode`(用于 `ipvs` 代理模式,需要内核 4.1+)
7174

7275
### kube proxy `nftables` 代理模式 {#kube-proxy-nftables-proxy-mode}
7376

@@ -110,6 +113,15 @@ Kubernetes 对 cgroup v1 的支持从 v1.31 开始处于维护模式;推荐使
110113

111114
在 runc 文档中,不推荐使用低于 5.2 的内核,因为其缺少冻结特性。
112115

116+
<!--
117+
## Pressure Stall Information (PSI) {#requirements-psi}
118+
119+
[Pressure Stall Information](/docs/reference/instrumentation/node-metrics#psi) is supported in Linux kernel versions 4.20 and up.
120+
-->
121+
## 压力阻塞信息(PSI){#requirements-psi}
122+
123+
Linux 内核 v4.20 及更高版本支持[压力阻塞信息](/zh-cn/docs/reference/instrumentation/node-metrics#psi)
124+
113125
<!--
114126
## Other kernel requirements {#requirements-other}
115127

content/zh-cn/docs/reference/node/kubelet-files.md

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ On Linux nodes, the kubelet also relies on reading cgroups and various system fi
4747
On Windows nodes, the kubelet collects metrics via a different mechanism that does not rely on
4848
paths.
4949
50-
There are also a few other files that are used by the kubelet as well as kubelet communicates using local Unix-domain sockets. Some are sockets that the
50+
There are also a few other files that are used by the kubelet as well,
51+
as kubelet communicates using local Unix-domain sockets. Some are sockets that the
5152
kubelet listens on, and for other sockets the kubelet discovers them and then connects
5253
as a client.
5354
-->
@@ -62,7 +63,8 @@ kubelet 所使用的还有其他文件,包括其使用本地 Unix 域套接字
6263

6364
<!--
6465
This page lists paths as Linux paths, which map to the Windows paths by adding a root disk
65-
`C:\` in place of `/` (unless specified otherwise). For example, `/var/lib/kubelet/device-plugins` maps to `C:\var\lib\kubelet\device-plugins`.
66+
`C:\` in place of `/` (unless specified otherwise).
67+
For example, `/var/lib/kubelet/device-plugins` maps to `C:\var\lib\kubelet\device-plugins`.
6668
-->
6769
本页列举的路径为 Linux 路径,若要映射到 Windows,你可以添加根磁盘 `C:\` 替换 `/`(除非另行指定)。
6870
例如,`/var/lib/kubelet/device-plugins` 映射到 `C:\var\lib\kubelet\device-plugins`
@@ -162,35 +164,50 @@ Names of files:
162164
### Checkpoint file for device manager {#device-manager-state}
163165
164166
Device manager creates checkpoints in the same directory with socket files: `/var/lib/kubelet/device-plugins/`.
165-
The name of a checkpoint file is `kubelet_internal_checkpoint` for [Device Manager](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager)
167+
The name of a checkpoint file is `kubelet_internal_checkpoint` for
168+
[Device Manager](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager)
166169
167-
### Pod status checkpoint storage {#pod-status-manager-state}
170+
### Pod resource checkpoints
168171
-->
169172
### 设备管理器的检查点文件 {#device-manager-state}
170173

171174
设备管理器在与套接字文件相同的目录(`/var/lib/kubelet/device-plugins/`)中创建检查点。
172175
对于[设备管理器](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager)
173176
检查点文件的名称为 `kubelet_internal_checkpoint`
174177

175-
### Pod 状态检查点存储 {#pod-status-manager-state}
178+
### Pod 状态检查点 {#pod-resource-checkpoints}
176179

177180
{{< feature-state feature_gate_name="InPlacePodVerticalScaling" >}}
178181

179182
<!--
180-
If your cluster has
181-
[in-place Pod vertical scaling](/docs/concepts/workloads/autoscaling/#in-place-resizing)
182-
enabled ([feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
183-
name `InPlacePodVerticalScaling`), then the kubelet stores a local record of allocated Pod resources.
183+
If a node has enabled the `InPlacePodVerticalScaling`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/),
184+
the kubelet stores a local record of _allocated_ and _actuated_ Pod resources.
185+
See [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)
186+
for more details on how these records are used.
187+
-->
188+
如果某个节点已启用了 `InPlacePodVerticalScaling`
189+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
190+
则 kubelet 存储有关 Pod 资源**已分配****已应用**状态的本地记录。
191+
有关如何使用这些记录的更多细节,
192+
请参阅[调整分配给容器的 CPU 和内存资源](/zh-cn/docs/tasks/configure-pod-container/resize-container-resources/)
193+
194+
<!--
195+
Names of files:
196+
197+
- `allocated_pods_state` records the resources allocated to each pod running on the node
198+
- `actuated_pods_state` records the resources that have been accepted by the runtime
199+
for each pod pod running on the node
184200
185-
The file name is `pod_status_manager_state` within the kubelet base directory
201+
The files are located within the kubelet base directory
186202
(`/var/lib/kubelet` by default on Linux; configurable using `--root-dir`).
187203
-->
188-
如果你的集群启用了[就地 Pod 垂直扩缩容](/zh-cn/docs/concepts/workloads/autoscaling/#in-place-resizing)
189-
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)名称为 `InPlacePodVerticalScaling`),
190-
则 kubelet 会在本地存储为 Pod 分配资源的记录。
204+
文件名称如下:
191205

192-
文件名为 `pod_status_manager_state`,位于 kubelet 基础目录内
193-
(在 Linux 上默认为 `/var/lib/kubelet`;你可以使用 `--root-dir` 进行配置)。
206+
- `allocated_pods_state`:记录分配给该节点上每个 Pod 的资源。
207+
- `actuated_pods_state`:记录运行时已接受并应用于该节点上每个 Pod 的资源。
208+
209+
这些文件位于 kubelet 的基础目录中(在 Linux 系统中默认是 `/var/lib/kubelet`
210+
也可以通过 `--root-dir` 参数进行配置)。
194211

195212
<!--
196213
### Container runtime
@@ -260,7 +277,8 @@ kubelet 查找的目录是 kubelet 基础目录下的 `plugins_registry`,
260277
因此在典型的 Linux 节点上这意味着 `/var/lib/kubelet/plugins_registry`
261278

262279
<!--
263-
Note, for the device plugins there are two alternative registration mechanisms. Only one should be used for a given plugin.
280+
Note, for the device plugins there are two alternative registration mechanisms
281+
Only one should be used for a given plugin.
264282
265283
The types of plugins that can place socket files into that directory are:
266284
@@ -294,6 +312,40 @@ stores state locally at `/var/lib/kubelet/graceful_node_shutdown_state`.
294312
[节点体面关闭](/zh-cn/docs/concepts/cluster-administration/node-shutdown/#graceful-node-shutdown)将状态存储在本地目录
295313
`/var/lib/kubelet/graceful_node_shutdown_state`
296314

315+
<!--
316+
### Image Pull Records
317+
-->
318+
### 镜像拉取记录 {#image-pull-records}
319+
320+
{{< feature-state feature_gate_name="KubeletEnsureSecretPulledImages" >}}
321+
322+
<!--
323+
The kubelet stores records of attempted and successful image pulls, and uses it
324+
to verify that the image was previously successfully pulled with the same credentials.
325+
-->
326+
kubelet 存储镜像拉取的尝试记录和成功记录,并使用这些记录来验证镜像是否曾使用相同的凭据被成功拉取过。
327+
328+
<!--
329+
These records are cached as files in the `image_registry` directory within
330+
the kubelet base directory. On a typical Linux node, this means `/var/lib/kubelet/image_manager`.
331+
There are two subdirectories to `image_manager`:
332+
* `pulling` - stores records about images the Kubelet is attempting to pull.
333+
* `pulled` - stores records about images that were successfully pulled by the Kubelet,
334+
along with metadata about the credentials used for the pulls.
335+
-->
336+
这些记录作为文件缓存在 kubelet 基础目录下的 `image_registry` 目录中。
337+
在典型的 Linux 节点上,这个路径通常为 `/var/lib/kubelet/image_manager`
338+
`image_manager` 目录下包含两个子目录:
339+
340+
* `pulling`:存储 kubelet 正在尝试拉取的镜像的相关记录。
341+
* `pulled`:存储 kubelet 成功拉取的镜像记录,以及与拉取所用凭据相关的元数据。
342+
343+
<!--
344+
See [Ensure Image Pull Credential Verification](/docs/concepts/containers/images#ensureimagepullcredentialverification)
345+
for details.
346+
-->
347+
更多细节请参阅[确保镜像拉取凭据验证](/zh-cn/docs/concepts/containers/images#ensureimagepullcredentialverification)
348+
297349
<!--
298350
## Security profiles & configuration
299351

0 commit comments

Comments
 (0)