@@ -27,7 +27,6 @@ For information on how to create a cluster with kubeadm once you have performed
27
27
有关在执行此安装过程后如何使用 kubeadm 创建集群的信息,请参见
28
28
[ 使用 kubeadm 创建集群] ( /zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/ ) 页面。
29
29
30
-
31
30
## {{% heading "prerequisites" %}}
32
31
33
32
<!--
@@ -48,7 +47,6 @@ For information on how to create a cluster with kubeadm once you have performed
48
47
* 开启机器上的某些端口。请参见[ 这里] ( #check-required-ports ) 了解更多详细信息。
49
48
* 禁用交换分区。为了保证 kubelet 正常工作,你 ** 必须** 禁用交换分区。
50
49
51
-
52
50
<!-- steps -->
53
51
54
52
<!--
@@ -130,94 +128,111 @@ nc 127.0.0.1 6443
130
128
```
131
129
132
130
<!--
133
- The pod network plugin you use (see below) may also require certain ports to be
131
+ The pod network plugin you use may also require certain ports to be
134
132
open. Since this differs with each pod network plugin, please see the
135
133
documentation for the plugins about what port(s) those need.
136
134
-->
137
135
你使用的 Pod 网络插件 (详见后续章节) 也可能需要开启某些特定端口。由于各个 Pod 网络插件的功能都有所不同,
138
136
请参阅他们各自文档中对端口的要求。
139
137
140
138
<!--
141
- ## Installing runtime {#installing-runtime}
139
+ ## Installing a container runtime {#installing-runtime}
142
140
143
141
To run containers in Pods, Kubernetes uses a
144
142
{{< glossary_tooltip term_id="container-runtime" text="container runtime" >}}.
145
143
-->
146
- ## 安装 runtime {#installing-runtime}
144
+ ## 安装容器运行时 {#installing-runtime}
147
145
148
146
为了在 Pod 中运行容器,Kubernetes 使用
149
147
{{< glossary_tooltip term_id="container-runtime" text="容器运行时(Container Runtime)" >}}。
150
148
151
- {{< tabs name="container-runtimes" >}}
152
- {{% tab name="Linux 节点" %}}
153
149
<!--
154
150
By default, Kubernetes uses the
155
151
{{< glossary_tooltip term_id="cri" text="Container Runtime Interface">}} (CRI)
156
152
to interface with your chosen container runtime.
157
153
158
154
If you don't specify a runtime, kubeadm automatically tries to detect an installed
159
- container runtime by scanning through a list of well known Unix domain sockets.
160
- The following table lists container runtimes that kubeadm looks for, and their associated socket paths:
161
-
162
- | Runtime | Domain Socket |
163
- |------------|---------------------------------|
164
- | Docker | /var/run/dockershim.sock |
165
- | containerd | /run/containerd/containerd.sock |
166
- | CRI-O | /var/run/crio/crio.sock |
155
+ container runtime by scanning through a list of known endpoints.
167
156
-->
168
157
默认情况下,Kubernetes 使用
169
158
{{< glossary_tooltip term_id="cri" text="容器运行时接口(Container Runtime Interface,CRI)" >}}
170
159
来与你所选择的容器运行时交互。
171
160
172
- 如果你不指定运行时,则 kubeadm 会自动尝试检测到系统上已经安装的运行时,
173
- 方法是扫描一组众所周知的 Unix 域套接字。
174
- 下面的表格列举了一些 kubeadm 查找的容器运行时及其对应的套接字路径:
175
-
176
- | 运行时 | 域套接字 |
177
- | ------------| ----------------------------------|
178
- | Docker Engine | ` /var/run/dockershim.sock ` |
179
- | containerd | ` /run/containerd/containerd.sock ` |
180
- | CRI-O | ` /var/run/crio/crio.sock ` |
161
+ 如果你不指定运行时,kubeadm 会自动尝试通过扫描已知的端点列表来检测已安装的容器运行时。
181
162
182
163
<!--
183
- <br />
184
- If both Docker Engine and containerd are detected, kubeadm will give precedence to Docker Engine. This is
185
- needed because Docker 18.09 ships with containerd and both are detectable even if you only
186
- installed Docker.
187
- **If any other two or more runtimes are detected, kubeadm exits with an error.**
188
-
189
- The kubelet can integrate with Docker Engine using the deprecated `dockershim` adapter (the dockershim is part of the kubelet itself).
164
+ If multiple or no container runtimes are detected kubeadm will throw an error
165
+ and will request that you specify which one you want to use.
190
166
191
167
See [container runtimes](/docs/setup/production-environment/container-runtimes/)
192
168
for more information.
193
169
-->
194
- <br />
195
- 如果同时检测到 Docker Engine 和 containerd,kubeadm 将优先考虑 Docker Engine。
196
- 这是必然的,因为 Docker 18.09 附带了 containerd 并且两者都是可以检测到的,
197
- 即使你仅安装了 Docker。
198
- ** 如果检测到其他两个或多个运行时,kubeadm 输出错误信息并退出。**
199
-
200
- kubelet 可以使用已弃用的 dockershim 适配器与 Docker Engine 集成(dockershim 是 kubelet 本身的一部分)。
170
+ 如果检测到有多个或者没有容器运行时,kubeadm 将抛出一个错误并要求你指定一个想要使用的运行时。
201
171
202
172
参阅[ 容器运行时] ( /zh/docs/setup/production-environment/container-runtimes/ )
203
173
以了解更多信息。
204
174
205
- {{% /tab %}}
206
- {{% tab name="其它操作系统" %}}
207
175
<!--
208
- By default, kubeadm uses {{< glossary_tooltip term_id="docker" >}} as the container runtime.
209
- The kubelet can integrate with Docker Engine using the deprecated `dockershim` adapter (the dockershim is part of the kubelet itself).
176
+ {{< note >}}
177
+ Docker Engine does not implement the [CRI](/docs/concepts/architecture/cri/)
178
+ which is a requirement for a container runtime to work with Kubernetes.
179
+ For that reason, an additional service [cri-dockerd](https://github.com/Mirantis/cri-dockerd)
180
+ has to be installed. cri-dockerd is a project based on the legacy built-in
181
+ Docker Engine support that was [removed](/dockershim) from the kubelet in version 1.24.
182
+ -->
210
183
211
- See [container runtimes](/docs/setup/production-environment/container-runtimes/)
212
- for more information.
184
+ {{< note >}}
185
+ Docker Engine 没有实现 [ CRI] ( /zh/docs/concepts/architecture/cri/ ) ,而这是容器运行时在 Kubernetes 中工作所需要的。
186
+ 为此,必须安装一个额外的服务 [ cri-dockerd] ( https://github.com/Mirantis/cri-dockerd ) 。
187
+ cri-dockerd 是一个基于传统的内置Docker引擎支持的项目,它在 1.24 版本从 kubelet 中[ 移除] ( /zh/dockershim ) 。
188
+ {{< /note >}}
189
+
190
+ <!--
191
+ The tables below include the known endpoints for supported operating systems:
192
+
193
+ {{< tabs name="container_runtime" >}}
194
+ {{% tab name="Linux" %}}
213
195
-->
214
- 默认情况下, kubeadm 使用 {{< glossary_tooltip term_id="docker" >}} 作为容器运行时。
215
- kubelet 可以使用已弃用的 dockershim 适配器与 Docker Engine 集成(dockershim 是 kubelet 本身的一部分)。
216
- 参阅[ 容器运行时] ( /zh/docs/setup/production-environment/container-runtimes/ )
217
- 以了解更多信息。
196
+ 下面的表格包括被支持的操作系统的已知端点。
218
197
219
- {{% /tab %}}
220
- {{< /tabs >}}
198
+ {{< tabs name="container_runtime" >}}
199
+ {{% tab name="Linux" %}}
200
+
201
+ <!--
202
+ {{< table >}}
203
+ | Runtime | Path to Unix domain socket |
204
+ |------------------------------------|----------------------------------------------|
205
+ | containerd | `unix:///var/run/containerd/containerd.sock` |
206
+ | CRI-O | `unix:///var/run/crio/crio.sock` |
207
+ | Docker Engine (using cri-dockerd) | `unix:///var/run/cri-dockerd.sock` |
208
+ {{< /table >}}
209
+ -->
210
+ {{< table >}}
211
+ | 运行时 | Unix 域套接字 |
212
+ | ------------------------------------| ----------------------------------------------|
213
+ | containerd | ` unix:///var/run/containerd/containerd.sock ` |
214
+ | CRI-O | ` unix:///var/run/crio/crio.sock ` |
215
+ | Docker Engine (使用 cri-dockerd) | ` unix:///var/run/cri-dockerd.sock ` |
216
+ {{< /table >}}
217
+
218
+ <!--
219
+ {{% tab name="Windows" %}}
220
+
221
+ {{< table >}}
222
+ | Runtime | Path to Windows named pipe |
223
+ |------------------------------------|----------------------------------------------|
224
+ | containerd | `npipe:////./pipe/containerd-containerd` |
225
+ | Docker Engine (using cri-dockerd) | `npipe:////./pipe/cri-dockerd` |
226
+ {{< /table >}}
227
+ -->
228
+ {{% tab name="Windows" %}}
229
+
230
+ {{< table >}}
231
+ | 运行时 | Windows 命名管道路径 |
232
+ | ------------------------------------| ----------------------------------------------|
233
+ | containerd | ` npipe:////./pipe/containerd-containerd ` |
234
+ | Docker Engine (使用 cri-dockerd) | ` npipe:////./pipe/cri-dockerd ` |
235
+ {{< /table >}}
221
236
222
237
<!--
223
238
## Installing kubeadm, kubelet and kubectl
@@ -389,7 +404,7 @@ curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_
389
404
```
390
405
391
406
<!--
392
- Define the directory to download command files
407
+ Define the directory to download command files
393
408
-->
394
409
定义要下载命令文件的目录。
395
410
@@ -475,7 +490,7 @@ for the management of cgroups on Linux machines.
475
490
-->
476
491
## 配置 cgroup 驱动程序 {#configure-cgroup-driver}
477
492
478
- 容器运行时和 kubelet 都具有名字为
493
+ 容器运行时和 kubelet 都具有名字为
479
494
[ "cgroup driver"] ( /zh/docs/setup/production-environment/container-runtimes/ )
480
495
的属性,该属性对于在 Linux 机器上管理 CGroups 而言非常重要。
481
496
@@ -507,4 +522,3 @@ If you are running into difficulties with kubeadm, please consult our [troublesh
507
522
* [Using kubeadm to Create a Cluster](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)
508
523
-->
509
524
* [ 使用 kubeadm 创建集群] ( /zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/ )
510
-
0 commit comments