From d22e255dd634947162c894f1b342b278cb7cc319 Mon Sep 17 00:00:00 2001 From: yuandongx Date: Wed, 30 Dec 2020 10:28:24 +0000 Subject: [PATCH] miss url && something is outdate --- .../tools/kubeadm/kubelet-integration.md | 76 ++++++++++--------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md b/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md index 476c27f075..8eeb160775 100644 --- a/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md +++ b/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md @@ -25,15 +25,15 @@ The lifecycle of the kubeadm CLI tool is decoupled from the on each node within the Kubernetes cluster. The kubeadm CLI tool is executed by the user when Kubernetes is initialized or upgraded, where as the kubelet is always running in the background. -Since the kubelet is a daemon, it needs to be maintained by some kind of a init +Since the kubelet is a daemon, it needs to be maintained by some kind of an init system or service manager. When the kubelet is installed using DEBs or RPMs, systemd is configured to manage the kubelet. You can use a different service manager instead, but you need to configure it manually. Some kubelet configuration details need to be the same across all kubelets involved in the cluster, while -other configuration aspects need to be set on a per-kubelet basis, to accommodate the different -characteristics of a given machine, such as OS, storage, and networking. You can manage the configuration -of your kubelets manually, but [kubeadm now provides a `KubeletConfiguration` API type for managing your +other configuration aspects need to be set on a per-kubelet basis to accommodate the different +characteristics of a given machine (such as OS, storage, and networking). You can manage the configuration +of your kubelets manually, but kubeadm now provides a `KubeletConfiguration` API type for [managing your kubelet configurations centrally](#configure-kubelets-using-kubeadm). --> kubeadm CLI 工具的生命周期与 [kubelet](/zh/docs/reference/command-line-tools-reference/kubelet)解耦,它是一个守护程序,在 Kubernetes 集群中的每个节点上运行。 @@ -41,10 +41,12 @@ kubeadm CLI 工具的生命周期与 [kubelet](/zh/docs/reference/command-line-t 由于kubelet是守护程序,因此需要通过某种初始化系统或服务管理器进行维护。 当使用 DEB 或 RPM 安装 kubelet 时,配置系统去管理 kubelet。 -您可以改用其他服务管理器,但需要手动地配置。 +你可以改用其他服务管理器,但需要手动地配置。 -集群中涉及的所有 kubelet 的一些配置细节都必须相同,而其他配置方面则需要基于每个 kubelet 进行设置,以适应给定机器的不同特性,例如操作系统、存储和网络。 -您可以手动地管理 kubelet 的配置,但是 [kubeadm 现在提供一种 `KubeletConfiguration` API 类型,用于集中管理 kubelet 的配置](#configure-kubelets-using-kubeadm)。 +集群中涉及的所有 kubelet 的一些配置细节都必须相同, +而其他配置方面则需要基于每个 kubelet 进行设置,以适应给定机器的不同特性(例如操作系统、存储和网络)。 +你可以手动地管理 kubelet 的配置,但是 kubeadm 现在提供一种 `KubeletConfiguration` API 类型 +用于[集中管理 kubelet 的配置](#configure-kubelets-using-kubeadm)。 @@ -91,17 +93,17 @@ clusterDNS: --> ### 将集群级配置传播到每个 kubelet 中 -您可以通过使用 `kubeadm init` 和 `kubeadm join` 命令为 kubelet 提供默认值。 +你可以通过使用 `kubeadm init` 和 `kubeadm join` 命令为 kubelet 提供默认值。 有趣的示例包括使用其他 CRI 运行时或通过服务器设置不同的默认子网。 -如果您想使用子网 `10.96.0.0/12` 作为默认的服务,您可以给 kubeadm 传递 `--service-cidr` 参数: +如果你想使用子网 `10.96.0.0/12` 作为默认的服务,你可以给 kubeadm 传递 `--service-cidr` 参数: ```bash kubeadm init --service-cidr 10.96.0.0/12 ``` 现在,可以从该子网分配服务的虚拟 IP。 -您还需要通过 kubelet 使用 `--cluster-dns` 标志设置 DNS 地址。 +你还需要通过 kubelet 使用 `--cluster-dns` 标志设置 DNS 地址。 在集群中的每个管理器和节点上的 kubelet 的设置需要相同。 kubelet 提供了一个版本化的结构化 API 对象,该对象可以配置 kubelet 中的大多数参数,并将此配置推送到集群中正在运行的每个 kubelet 上。 此对象被称为 **kubelet 的配置组件**。 @@ -119,7 +121,7 @@ clusterDNS: ## kubelet 的 systemd 文件 {#the-kubelet-drop-in-file-for-systemd} -kubeadm 中附带了有关系统如何运行 kubelet 的 systemd 配置文件。 +`kubeadm` 中附带了有关系统如何运行 kubelet 的 systemd 配置文件。 请注意 kubeadm CLI 命令不会修改此文件。 -通过 `kubeadm` [DEB](https://github.com/kubernetes/kubernetes/blob/master/build/debs/10-kubeadm.conf) 或者 [RPM 包](https://github.com/kubernetes/kubernetes/blob/master/build/rpms/10-kubeadm.conf) 安装的配置文件已被写入 `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` 并由系统使用。 -它加强了基础设施 [`kubelet.service` for RPM](https://github.com/kubernetes/kubernetes/blob/master/build/rpms/kubelet.service) (resp. [`kubelet.service` for DEB](https://github.com/kubernetes/kubernetes/blob/master/build/debs/kubelet.service))): +通过 `kubeadm` [DEB](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf) +或者 [RPM 包](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubeadm/10-kubeadm.conf) +安装的配置文件被写入 `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` 并由系统使用。 +它对原来的 [RPM 版本 `kubelet.service`](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubelet/kubelet.service) +或者 [DEB 版本 `kubelet.service`](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service) +作了增强: ```none [Service] @@ -361,10 +368,9 @@ The DEB and RPM packages shipped with the Kubernetes releases are: | Package name | Description | |--------------|-------------| | `kubeadm` | Installs the `/usr/bin/kubeadm` CLI tool and the [kubelet drop-in file](#the-kubelet-drop-in-file-for-systemd) for the kubelet. | -| `kubelet` | Installs the `/usr/bin/kubelet` binary. | +| `kubelet` | Installs the kubelet binary in `/usr/bin` and CNI binaries in `/opt/cni/bin`. | | `kubectl` | Installs the `/usr/bin/kubectl` binary. | -| `kubernetes-cni` | Installs the official CNI binaries into the `/opt/cni/bin` directory. | -| `cri-tools` | Installs the `/usr/bin/crictl` binary from the [cri-tools git repository](https://github.com/kubernetes-incubator/cri-tools). | +| `cri-tools` | Installs the `/usr/bin/crictl` binary from the [cri-tools git repository](https://github.com/kubernetes-sigs/cri-tools). | --> ## Kubernetes 二进制文件和软件包内容 @@ -373,8 +379,8 @@ Kubernetes 版本对应的 DEB 和 RPM 软件包是: | Package name | Description | |--------------|-------------| | `kubeadm` | 给 kubelet 安装 `/usr/bin/kubeadm` CLI 工具和 [kubelet 的 systemd 文件](#the-kubelet-drop-in-file-for-systemd)。 | -| `kubelet` | 安装 `/usr/bin/kubelet` 二进制文件和 `/opt/cni/bin` CNI 二进制文件。 | -| `kubectl` | 安装 `/usr/bin/kubectl` 二进制文件。 | -| `cri-tools` | 从 [cri-tools git 仓库](https://github.com/kubernetes-incubator/cri-tools)中安装 `/usr/bin/crictl` 二进制文件。 | +| `kubelet` | 安装 kublet 可执行文件到 `/usr/bin` 路径,安装 CNI 可执行文件到 `/opt/cni/bin` 路径。 | +| `kubectl` | 安装 `/usr/bin/kubectl` 可执行文件。 | +| `cri-tools` | 从 [cri-tools git 仓库](https://github.com/kubernetes-sigs/cri-tools)中安装 `/usr/bin/crictl` 可执行文件。 |