@@ -21,7 +21,7 @@ You need to install a
2121{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
2222into each node in the cluster so that Pods can run there. This page outlines
2323what is involved and describes related tasks for setting up nodes.
24- -->
24+ -->
2525你需要在集群内每个节点上安装一个
2626{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}
2727以使 Pod 可以运行在上面。本文概述了所涉及的内容并描述了与节点设置相关的任务。
@@ -145,7 +145,7 @@ sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables ne
145145```
146146
147147<!--
148- ## Cgroup drivers
148+ ## cgroup drivers
149149
150150On Linux, {{< glossary_tooltip text="control groups" term_id="cgroup" >}}
151151are used to constrain resources that are allocated to processes.
@@ -155,12 +155,12 @@ are used to constrain resources that are allocated to processes.
155155在 Linux 上,{{<glossary_tooltip text="控制组(CGroup)" term_id="cgroup" >}}用于限制分配给进程的资源。
156156
157157<!--
158- Both {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and the
158+ Both the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and the
159159underlying container runtime need to interface with control groups to enforce
160- [resource management for pods and containers](/docs/concepts/configuration/manage-resources-containers/) and set
161- resources such as cpu/memory requests and limits. To interface with control
160+ [resource management for pods and containers](/docs/concepts/configuration/manage-resources-containers/)
161+ and set resources such as cpu/memory requests and limits. To interface with control
162162groups, the kubelet and the container runtime need to use a *cgroup driver*.
163- It's critical that the kubelet and the container runtime uses the same cgroup
163+ It's critical that the kubelet and the container runtime use the same cgroup
164164driver and are configured the same.
165165-->
166166{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 和底层容器运行时都需要对接控制组来强制执行
@@ -182,16 +182,15 @@ There are two cgroup drivers available:
182182<!--
183183### cgroupfs driver {#cgroupfs-cgroup-driver}
184184
185- The `cgroupfs` driver is the default cgroup driver in the kubelet. When the `cgroupfs`
186- driver is used, the kubelet and the container runtime directly interface with
185+ The `cgroupfs` driver is the [ default cgroup driver in the kubelet](docs/reference/config-api/kubelet-config.v1beta1).
186+ When the `cgroupfs` driver is used, the kubelet and the container runtime directly interface with
187187the cgroup filesystem to configure cgroups.
188188
189189The `cgroupfs` driver is **not** recommended when
190190[systemd](https://www.freedesktop.org/wiki/Software/systemd/) is the
191191init system because systemd expects a single cgroup manager on
192- the system. Additionally, if you use [cgroup v2](/docs/concepts/architecture/cgroups)
193- , use the `systemd` cgroup driver instead of
194- `cgroupfs`.
192+ the system. Additionally, if you use [cgroup v2](/docs/concepts/architecture/cgroups), use the `systemd`
193+ cgroup driver instead of `cgroupfs`.
195194-->
196195### cgroupfs 驱动 {#cgroupfs-cgroup-driver}
197196
@@ -237,6 +236,7 @@ the kubelet and the container runtime when systemd is the selected init system.
237236
238237当 systemd 是选定的初始化系统时,缓解这个不稳定问题的方法是针对 kubelet 和容器运行时将
239238` systemd ` 用作 cgroup 驱动。
239+
240240<!--
241241To set `systemd` as the cgroup driver, edit the
242242[`KubeletConfiguration`](/docs/tasks/administer-cluster/kubelet-config-file/)
@@ -252,13 +252,22 @@ kind: KubeletConfiguration
252252cgroupDriver : systemd
253253` ` `
254254
255+ {{< note >}}
256+ <!--
257+ Starting with v1.22 and later, when creating a cluster with kubeadm, if the user does not set
258+ the ` cgroupDriver` field under `KubeletConfiguration`, kubeadm defaults it to `systemd`.
259+ -->
260+ 从 v1.22 开始,在使用 kubeadm 创建集群时,如果用户没有在
261+ ` KubeletConfiguration` 下设置 `cgroupDriver` 字段,kubeadm 默认使用 `systemd`。
262+ {{< /note >}}
263+
255264<!--
256265If you configure `systemd` as the cgroup driver for the kubelet, you must also
257266configure `systemd` as the cgroup driver for the container runtime. Refer to
258267the documentation for your container runtime for instructions. For example :
259268-->
260- 如果你将 `systemd` 配置为 kubelet 的 cgroup 驱动,你也必须将 `systemd` 配置为容器运行时的 cgroup 驱动。
261- 参阅容器运行时文档,了解指示说明。例如:
269+ 如果你将 `systemd` 配置为 kubelet 的 cgroup 驱动,你也必须将 `systemd`
270+ 配置为容器运行时的 cgroup 驱动。 参阅容器运行时文档,了解指示说明。例如:
262271
263272* [containerd](#containerd-systemd)
264273* [CRI-O](#cri-o)
@@ -311,14 +320,14 @@ using the (deprecated) v1alpha2 API instead.
311320
312321你的容器运行时必须至少支持 v1alpha2 版本的容器运行时接口。
313322
314- Kubernetes [从 1.26 版本开始](/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal)**仅适用于**
323+ Kubernetes [从 1.26 版本开始](/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal)**仅适用于**
315324v1 版本的容器运行时(CRI)API。早期版本默认为 v1 版本,
316325但是如果容器运行时不支持 v1 版本的 API,
317326则 kubelet 会回退到使用(已弃用的)v1alpha2 版本的 API。
318327
319328<!--
320329# # Container runtimes
321- -->
330+ -->
322331# # 容器运行时
323332
324333{{% thirdparty-content %}}
@@ -331,9 +340,9 @@ This section outlines the necessary steps to use containerd as CRI runtime.
331340本节概述了使用 containerd 作为 CRI 运行时的必要步骤。
332341
333342<!--
334- Follow the instructions for [getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md). Return to this step once you've created a valid configuration file, `config.toml`.
335-
336- To install containerd on your system, follow the instructions on [getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md). Return to this step once you've created a valid `config.toml` configuration file.
343+ To install containerd on your system, follow the instructions on
344+ [getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md).
345+ Return to this step once you've created a valid `config.toml` configuration file.
337346-->
338347要在系统上安装 containerd,请按照[开始使用 containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md)
339348的说明进行操作。创建有效的 `config.toml` 配置文件后返回此步骤。
@@ -606,4 +615,3 @@ As well as a container runtime, your cluster will need a working
606615[network plugin](/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model).
607616-->
608617除了容器运行时,你的集群还需要有效的[ 网络插件] ( /zh-cn/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model ) 。
609-
0 commit comments