diff --git a/content/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index 47922ff39b..453cdedbd7 100644 --- a/content/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -79,6 +79,69 @@ that provides the expected symbols. 要么提供了一个[兼容层](https://wiki.alpinelinux.org/wiki/Running_glibc_programs)以提供所需的符号。 {{< /note >}} + +## 检查你的操作系统版本 {#check-your-os-version} + +{{% thirdparty-content %}} + +{{< tabs name="operating_system_version_check" >}} +{{% tab name="Linux" %}} + + +* kubeadm 项目支持 LTS 内核。参阅 [LTS 内核列表](https://www.kernel.org/category/releases.html)。 +* 你可以使用命令 `uname -r` 获取内核版本。 + +欲了解更多信息,参阅 [Linux 内核要求](/zh-cn/docs/reference/node/kernel-version-requirements/)。 + +{{% /tab %}} + +{{% tab name="Windows" %}} + + +* kubeadm 项目支持最近的内核版本。有关最新内核的列表,参阅 + [Windows Server 版本信息](https://learn.microsoft.com/zh-cn/windows/release-health/windows-server-release-info)。 +* 你可以使用命令 `systeminfo` 获取内核版本(也称为操作系统版本)。 + +欲了解更多信息,参阅 [Windows 操作系统版本兼容性](/zh-cn/docs/concepts/windows/intro/#windows-os-version-support)。 + +{{% /tab %}} +{{< /tabs >}} + + +由 kubeadm 创建的 Kubernetes 集群依赖于使用内核特性的相关软件。 +这些软件包括但不限于{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}、 +{{< glossary_tooltip term_id="kubelet" text="kubelet">}} +和{{< glossary_tooltip text="容器网络接口(CNI)" term_id="cni" >}}插件。 + + +为帮助你避免因内核版本不受支持而引发的意外错误,kubeadm 运行 `SystemVerification` 执行预检。 +如果内核版本不受支持,预检将失败。 + +如果你确认你的内核具备所需特性,尽管其版本不在 kubeadm 支持范围内,你也可以选择跳过此检查。 + ## 安装容器运行时 {#installing-runtime} -为了在 Pod 中运行容器,Kubernetes 使用 -{{< glossary_tooltip term_id="container-runtime" text="容器运行时(Container Runtime)" >}}。 +为了在 Pod 中运行容器,Kubernetes +使用{{< glossary_tooltip term_id="container-runtime" text="容器运行时(Container Runtime)" >}}。 -默认情况下,Kubernetes 使用 -{{< glossary_tooltip term_id="cri" text="容器运行时接口(Container Runtime Interface,CRI)" >}} +默认情况下,Kubernetes +使用{{< glossary_tooltip term_id="cri" text="容器运行时接口(Container Runtime Interface,CRI)" >}} 来与你所选择的容器运行时交互。 如果你不指定运行时,kubeadm 会自动尝试通过扫描已知的端点列表来检测已安装的容器运行时。 @@ -197,8 +260,7 @@ for more information. --> 如果检测到有多个或者没有容器运行时,kubeadm 将抛出一个错误并要求你指定一个想要使用的运行时。 -参阅[容器运行时](/zh-cn/docs/setup/production-environment/container-runtimes/) -以了解更多信息。 +参阅[容器运行时](/zh-cn/docs/setup/production-environment/container-runtimes/)以了解更多信息。 {{< note >}} 1. 更新 `apt` 包索引并安装使用 Kubernetes `apt` 仓库所需要的包: @@ -355,13 +423,15 @@ These instructions are for Kubernetes {{< skew currentVersion >}}. 2. 下载用于 Kubernetes 软件包仓库的公共签名密钥。所有仓库都使用相同的签名密钥,因此你可以忽略URL中的版本: - ```shell # 如果 `/etc/apt/keyrings` 目录不存在,则应在 curl 命令之前创建它,请阅读下面的注释。 # sudo mkdir -p -m 755 /etc/apt/keyrings @@ -461,6 +531,19 @@ exist by default, and it should be created before the curl command. in the URL to match your desired minor version (you should also check that you are reading the documentation for the version of Kubernetes that you plan to install). + + ```shell + # This overwrites any existing configuration in /etc/yum.repos.d/kubernetes.repo + cat <}}/rpm/ + enabled=1 + gpgcheck=1 + gpgkey=https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/rpm/repodata/repomd.xml.key + exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni + EOF + ``` --> 2. 添加 Kubernetes 的 `yum` 仓库。在仓库定义中的 `exclude` 参数确保了与 Kubernetes 相关的软件包在运行 `yum update` 时不会升级,因为升级