Skip to content

Commit 8366f69

Browse files
committed
[zh] Update kubeadm/install-kubeadm.md
1 parent 95b2dce commit 8366f69

File tree

1 file changed

+93
-10
lines changed

1 file changed

+93
-10
lines changed

content/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md

Lines changed: 93 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,69 @@ that provides the expected symbols.
7979
要么提供了一个[兼容层](http://wiki.alpinelinux.org/wiki/Running_glibc_programs)以提供所需的符号。
8080
{{< /note >}}
8181

82+
<!--
83+
## Check your OS version
84+
-->
85+
## 检查你的操作系统版本 {#check-your-os-version}
86+
87+
{{% thirdparty-content %}}
88+
89+
{{< tabs name="operating_system_version_check" >}}
90+
{{% tab name="Linux" %}}
91+
92+
<!--
93+
* The kubeadm project supports LTS kernels. See [List of LTS kernels](http://www.kernel.org/category/releases.html).
94+
* You can get the kernel version using the command `uname -r`
95+
96+
For more information, see [Linux Kernel Requirements](/docs/reference/node/kernel-version-requirements/).
97+
-->
98+
* kubeadm 项目支持 LTS 内核。参阅 [LTS 内核列表](http://www.kernel.org/category/releases.html)
99+
* 你可以使用命令 `uname -r` 获取内核版本。
100+
101+
欲了解更多信息,参阅 [Linux 内核要求](/zh-cn/docs/reference/node/kernel-version-requirements/)
102+
103+
{{% /tab %}}
104+
105+
{{% tab name="Windows" %}}
106+
107+
<!--
108+
* The kubeadm project supports recent kernel versions. For a list of recent kernels, see [Windows Server Release Information](http://learn.microsoft.com/en-us/windows/release-health/windows-server-release-info).
109+
* You can get the kernel version (also called the OS version) using the command `systeminfo`
110+
111+
For more information, see [Windows OS version compatibility](/docs/concepts/windows/intro/#windows-os-version-support).
112+
-->
113+
* kubeadm 项目支持最近的内核版本。有关最新内核的列表,参阅
114+
[Windows Server 版本信息](http://learn.microsoft.com/zh-cn/windows/release-health/windows-server-release-info)
115+
* 你可以使用命令 `systeminfo` 获取内核版本(也称为操作系统版本)。
116+
117+
欲了解更多信息,参阅 [Windows 操作系统版本兼容性](/zh-cn/docs/concepts/windows/intro/#windows-os-version-support)
118+
119+
{{% /tab %}}
120+
{{< /tabs >}}
121+
122+
<!--
123+
A Kubernetes cluster created by kubeadm depends on software that use kernel features.
124+
This software includes, but is not limited to the
125+
{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}},
126+
the {{< glossary_tooltip term_id="kubelet" text="kubelet">}}, and a {{< glossary_tooltip text="Container Network Interface" term_id="cni" >}} plugin.
127+
-->
128+
由 kubeadm 创建的 Kubernetes 集群依赖于使用内核特性的相关软件。
129+
这些软件包括但不限于{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}、
130+
{{< glossary_tooltip term_id="kubelet" text="kubelet">}}
131+
和{{< glossary_tooltip text="容器网络接口(CNI)" term_id="cni" >}}插件。
132+
133+
<!--
134+
To help you avoid unexpected errors as a result of an unsupported kernel version, kubeadm runs the `SystemVerification`
135+
pre-flight check. This check fails if the kernel version is not supported.
136+
137+
You may choose to skip the check, if you know that your kernel
138+
provides the required features, even though kubeadm does not support its version.
139+
-->
140+
为帮助你避免因内核版本不受支持而引发的意外错误,kubeadm 运行 `SystemVerification` 执行预检。
141+
如果内核版本不受支持,预检将失败。
142+
143+
如果你确认你的内核具备所需特性,尽管其版本不在 kubeadm 支持范围内,你也可以选择跳过此检查。
144+
82145
<!--
83146
## Verify the MAC address and product_uuid are unique for every node {#verify-mac-address}
84147
@@ -171,8 +234,8 @@ To run containers in Pods, Kubernetes uses a
171234
-->
172235
## 安装容器运行时 {#installing-runtime}
173236

174-
为了在 Pod 中运行容器,Kubernetes 使用
175-
{{< glossary_tooltip term_id="container-runtime" text="容器运行时(Container Runtime)" >}}。
237+
为了在 Pod 中运行容器,Kubernetes
238+
使用{{< glossary_tooltip term_id="container-runtime" text="容器运行时(Container Runtime)" >}}。
176239

177240
<!--
178241
By default, Kubernetes uses the
@@ -182,8 +245,8 @@ to interface with your chosen container runtime.
182245
If you don't specify a runtime, kubeadm automatically tries to detect an installed
183246
container runtime by scanning through a list of known endpoints.
184247
-->
185-
默认情况下,Kubernetes 使用
186-
{{< glossary_tooltip term_id="cri" text="容器运行时接口(Container Runtime Interface,CRI)" >}}
248+
默认情况下,Kubernetes
249+
使用{{< glossary_tooltip term_id="cri" text="容器运行时接口(Container Runtime Interface,CRI)" >}}
187250
来与你所选择的容器运行时交互。
188251

189252
如果你不指定运行时,kubeadm 会自动尝试通过扫描已知的端点列表来检测已安装的容器运行时。
@@ -197,8 +260,7 @@ for more information.
197260
-->
198261
如果检测到有多个或者没有容器运行时,kubeadm 将抛出一个错误并要求你指定一个想要使用的运行时。
199262

200-
参阅[容器运行时](/zh-cn/docs/setup/production-environment/container-runtimes/)
201-
以了解更多信息。
263+
参阅[容器运行时](/zh-cn/docs/setup/production-environment/container-runtimes/)以了解更多信息。
202264

203265
{{< note >}}
204266
<!--
@@ -343,6 +405,12 @@ These instructions are for Kubernetes {{< skew currentVersion >}}.
343405

344406
<!--
345407
1. Update the `apt` package index and install packages needed to use the Kubernetes `apt` repository:
408+
409+
```shell
410+
sudo apt-get update
411+
# apt-transport-http may be a dummy package; if so, you can skip that package
412+
sudo apt-get install -y apt-transport-http ca-certificates curl gpg
413+
```
346414
-->
347415
1. 更新 `apt` 包索引并安装使用 Kubernetes `apt` 仓库所需要的包:
348416

@@ -355,13 +423,15 @@ These instructions are for Kubernetes {{< skew currentVersion >}}.
355423
<!--
356424
2. Download the public signing key for the Kubernetes package repositories.
357425
The same signing key is used for all repositories so you can disregard the version in the URL:
426+
427+
```shell
428+
# If the directory `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.
429+
# sudo mkdir -p -m 755 /etc/apt/keyrings
430+
curl -fsSL http://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
431+
```
358432
-->
359433
2. 下载用于 Kubernetes 软件包仓库的公共签名密钥。所有仓库都使用相同的签名密钥,因此你可以忽略URL中的版本:
360434

361-
<!--
362-
# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.
363-
# sudo mkdir -p -m 755 /etc/apt/keyrings
364-
-->
365435
```shell
366436
# 如果 `/etc/apt/keyrings` 目录不存在,则应在 curl 命令之前创建它,请阅读下面的注释。
367437
# sudo mkdir -p -m 755 /etc/apt/keyrings
@@ -461,6 +531,19 @@ exist by default, and it should be created before the curl command.
461531
in the URL to match your desired minor version (you should also check that
462532
you are reading the documentation for the version of Kubernetes that you
463533
plan to install).
534+
535+
```shell
536+
# This overwrites any existing configuration in /etc/yum.repos.d/kubernetes.repo
537+
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
538+
[kubernetes]
539+
name=Kubernetes
540+
baseurl=http://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/rpm/
541+
enabled=1
542+
gpgcheck=1
543+
gpgkey=http://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/rpm/repodata/repomd.xml.key
544+
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
545+
EOF
546+
```
464547
-->
465548
2. 添加 Kubernetes 的 `yum` 仓库。在仓库定义中的 `exclude` 参数确保了与
466549
Kubernetes 相关的软件包在运行 `yum update` 时不会升级,因为升级

0 commit comments

Comments
 (0)