@@ -57,8 +57,7 @@ as Ansible or Terraform.
57
57
To follow this guide, you need:
58
58
59
59
- One or more machines running a deb/rpm-compatible Linux OS; for example: Ubuntu or CentOS.
60
- - 2 GiB or more of RAM per machine--any less leaves little room for your
61
- apps.
60
+ - 2 GiB or more of RAM per machine--any less leaves little room for your apps.
62
61
- At least 2 CPUs on the machine that you use as a control-plane node.
63
62
- Full network connectivity among all machines in the cluster. You can use either a
64
63
public or a private network.
@@ -92,7 +91,7 @@ The `kubeadm` tool's overall feature state is General Availability (GA). Some su
92
91
still under active development. The implementation of creating the cluster may change
93
92
slightly as the tool evolves, but the overall implementation should be pretty stable.
94
93
-->
95
- ` kubeadm ` 工具的整体功能状态为一般可用性 (GA)。一些子功能仍在积极开发中 。
94
+ ` kubeadm ` 工具的整体特性状态为正式发布 (GA)。一些子特性仍在积极开发中 。
96
95
随着工具的发展,创建集群的实现可能会略有变化,但总体实现应相当稳定。
97
96
98
97
{{< note >}}
@@ -132,16 +131,18 @@ Any commands under `kubeadm alpha` are, by definition, supported on an alpha lev
132
131
#### 安装组件 {#component-installation}
133
132
134
133
<!--
135
- Install a {{< glossary_tooltip term_id="container-runtime" text="container runtime" >}} and kubeadm on all the hosts.
136
- For detailed instructions and other prerequisites, see [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
134
+ Install a {{< glossary_tooltip term_id="container-runtime" text="container runtime" >}}
135
+ and kubeadm on all the hosts. For detailed instructions and other prerequisites, see
136
+ [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
137
137
-->
138
138
在所有主机上安装{{< glossary_tooltip term_id="container-runtime" text="容器运行时" >}}和 kubeadm。
139
139
详细说明和其他前提条件,请参见[ 安装 kubeadm] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ ) 。
140
140
141
141
{{< note >}}
142
142
<!--
143
143
If you have already installed kubeadm, see the first two steps of the
144
- [Upgrading Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes) document for instructions on how to upgrade kubeadm.
144
+ [Upgrading Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes)
145
+ document for instructions on how to upgrade kubeadm.
145
146
146
147
When you upgrade, the kubelet restarts every few seconds as it waits in a crashloop for
147
148
kubeadm to tell it what to do. This crashloop is expected and normal.
@@ -243,9 +244,8 @@ certificate files is reflected. See
243
244
for more details on this topic.
244
245
-->
245
246
你分配给控制平面组件的 IP 地址将成为其 X.509 证书的使用者备用名称字段的一部分。
246
- 更改这些 IP 地址将需要签署新的证书并重启受影响的组件,
247
- 以便反映证书文件中的变化。有关此主题的更多细节参见
248
- [ 手动续期证书] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#manual-certificate-renewal ) 。
247
+ 更改这些 IP 地址将需要签署新的证书并重启受影响的组件,以便反映证书文件中的变化。
248
+ 有关此主题的更多细节参见[ 手动续期证书] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#manual-certificate-renewal ) 。
249
249
250
250
{{< warning >}}
251
251
<!--
@@ -311,13 +311,13 @@ communicates with).
311
311
312
312
<!--
313
313
1. (Recommended) If you have plans to upgrade this single control-plane `kubeadm` cluster
314
- to [high availability](/docs/setup/production-environment/tools/kubeadm/high-availability/)
315
- you should specify the `--control-plane-endpoint` to set the shared endpoint for all control-plane nodes.
316
- Such an endpoint can be either a DNS name or an IP address of a load-balancer.
314
+ to [high availability](/docs/setup/production-environment/tools/kubeadm/high-availability/)
315
+ you should specify the `--control-plane-endpoint` to set the shared endpoint for all control-plane nodes.
316
+ Such an endpoint can be either a DNS name or an IP address of a load-balancer.
317
317
1. Choose a Pod network add-on, and verify whether it requires any arguments to
318
- be passed to `kubeadm init`. Depending on which
319
- third-party provider you choose, you might need to set the `--pod-network-cidr` to
320
- a provider-specific value. See [Installing a Pod network add-on](#pod-network).
318
+ be passed to `kubeadm init`. Depending on which
319
+ third-party provider you choose, you might need to set the `--pod-network-cidr` to
320
+ a provider-specific value. See [Installing a Pod network add-on](#pod-network).
321
321
-->
322
322
1 . (推荐)如果计划将单个控制平面 kubeadm 集群升级成[ 高可用] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/high-availability/ ) ,
323
323
你应该指定 ` --control-plane-endpoint ` 为所有控制平面节点设置共享端点。
@@ -328,9 +328,9 @@ a provider-specific value. See [Installing a Pod network add-on](#pod-network).
328
328
329
329
<!--
330
330
1. (Optional) `kubeadm` tries to detect the container runtime by using a list of well
331
- known endpoints. To use different container runtime or if there are more than one installed
332
- on the provisioned node, specify the `--cri-socket` argument to `kubeadm`. See
333
- [Installing a runtime](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime).
331
+ known endpoints. To use different container runtime or if there are more than one installed
332
+ on the provisioned node, specify the `--cri-socket` argument to `kubeadm`. See
333
+ [Installing a runtime](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime).
334
334
-->
335
335
3 . (可选)` kubeadm ` 试图通过使用已知的端点列表来检测容器运行时。
336
336
使用不同的容器运行时或在预配置的节点上安装了多个容器运行时,请为 ` kubeadm init ` 指定 ` --cri-socket ` 参数。
@@ -351,7 +351,7 @@ kubeadm init <args>
351
351
### 关于 apiserver-advertise-address 和 ControlPlaneEndpoint 的注意事项 {#considerations-about-apiserver-advertise-address-and-controlplaneendpoint}
352
352
353
353
<!--
354
- While `--apiserver-advertise-address` can be used to set the advertise address for this particular
354
+ While `--apiserver-advertise-address` can be used to set the advertised address for this particular
355
355
control-plane node's API server, `--control-plane-endpoint` can be used to set the shared endpoint
356
356
for all control-plane nodes.
357
357
-->
@@ -377,7 +377,7 @@ Here is an example mapping:
377
377
<!--
378
378
Where `192.168.0.102` is the IP address of this node and `cluster-endpoint` is a custom DNS name that maps to this IP.
379
379
This will allow you to pass `--control-plane-endpoint=cluster-endpoint` to `kubeadm init` and pass the same DNS name to
380
- `kubeadm join`. Later you can modify `cluster-endpoint` to point to the address of your load-balancer in an
380
+ `kubeadm join`. Later you can modify `cluster-endpoint` to point to the address of your load-balancer in a
381
381
high availability scenario.
382
382
-->
383
383
其中 ` 192.168.0.102 ` 是此节点的 IP 地址,` cluster-endpoint ` 是映射到该 IP 的自定义 DNS 名称。
@@ -678,7 +678,8 @@ The `node-role.kubernetes.io/control-plane` label is such a restricted label and
678
678
a privileged client after a node has been created. To do that manually you can do the same by using `kubectl label`
679
679
and ensure it is using a privileged kubeconfig such as the kubeadm managed `/etc/kubernetes/admin.conf`.
680
680
-->
681
- 默认情况下,kubeadm 启用 [ NodeRestriction] ( /zh-cn/docs/reference/access-authn-authz/admission-controllers/#noderestriction )
681
+ 默认情况下,kubeadm 启用
682
+ [ NodeRestriction] ( /zh-cn/docs/reference/access-authn-authz/admission-controllers/#noderestriction )
682
683
准入控制器来限制 kubelet 在节点注册时可以应用哪些标签。准入控制器文档描述 kubelet ` --node-labels ` 选项允许使用哪些标签。
683
684
其中 ` node-role.kubernetes.io/control-plane ` 标签就是这样一个受限制的标签,
684
685
kubeadm 在节点创建后使用特权客户端手动应用此标签。
@@ -737,8 +738,8 @@ kubectl label nodes --all node.kubernetes.io/exclude-from-external-load-balancer
737
738
<!--
738
739
### Adding more control plane nodes
739
740
740
- See [Creating Highly Available Clusters with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/) for steps on creating a high availability kubeadm cluster by adding more control plane
741
- nodes.
741
+ See [Creating Highly Available Clusters with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/)
742
+ for steps on creating a high availability kubeadm cluster by adding more control plane nodes.
742
743
743
744
### Adding worker nodes {#join-nodes}
744
745
@@ -750,7 +751,7 @@ the `kubeadm join` command:
750
751
* [Adding Linux worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-linux-nodes/)
751
752
* [Adding Windows worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/)
752
753
-->
753
- ### 添加更多控制平面节点
754
+ ### 添加更多控制平面节点 {#adding-more-control-plane-nodes}
754
755
755
756
请参阅[ 使用 kubeadm 创建高可用性集群] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/high-availability/ ) ,
756
757
了解通过添加更多控制平面节点创建高可用性 kubeadm 集群的步骤。
@@ -821,7 +822,7 @@ admin.conf 文件为用户提供了对集群的超级用户特权。
821
822
### (可选)将 API 服务器代理到本地主机 {#optional-proxying-api-server-to-localhost}
822
823
823
824
<!--
824
- If you want to connect to the API Server from outside the cluster you can use
825
+ If you want to connect to the API Server from outside the cluster, you can use
825
826
`kubectl proxy`:
826
827
-->
827
828
如果你要从集群外部连接到 API 服务器,则可以使用 ` kubectl proxy ` :
@@ -887,7 +888,8 @@ kubeadm reset
887
888
```
888
889
889
890
<!--
890
- The reset process does not reset or clean up iptables rules or IPVS tables. If you wish to reset iptables, you must do so manually:
891
+ The reset process does not reset or clean up iptables rules or IPVS tables.
892
+ If you wish to reset iptables, you must do so manually:
891
893
-->
892
894
重置过程不会重置或清除 iptables 规则或 IPVS 表。如果你希望重置 iptables,则必须手动进行:
893
895
@@ -903,6 +905,7 @@ If you want to reset the IPVS tables, you must run the following command:
903
905
``` bash
904
906
ipvsadm -C
905
907
```
908
+
906
909
<!--
907
910
Now remove the node:
908
911
@@ -996,6 +999,7 @@ the same version as kubeadm or three version older.
996
999
997
1000
<!--
998
1001
Example:
1002
+
999
1003
* kubeadm is at {{< skew currentVersion >}}
1000
1004
* kubelet on the host must be at {{< skew currentVersion >}}, {{< skew currentVersionAddMinor -1 >}},
1001
1005
{{< skew currentVersionAddMinor -2 >}} or {{< skew currentVersionAddMinor -3 >}}
@@ -1047,11 +1051,13 @@ MINOR 版本或比后者新一个 MINOR 版本。
1047
1051
1048
1052
<!--
1049
1053
Example for `kubeadm upgrade`:
1054
+
1050
1055
* kubeadm version {{< skew currentVersionAddMinor -1 >}} was used to create or upgrade the node
1051
1056
* The version of kubeadm used for upgrading the node must be at {{< skew currentVersionAddMinor -1 >}}
1052
- or {{< skew currentVersion >}}
1057
+ or {{< skew currentVersion >}}
1053
1058
-->
1054
1059
` kubeadm upgrade ` 的例子:
1060
+
1055
1061
* 用于创建或升级节点的 kubeadm 版本为 {{< skew currentVersionAddMinor -1 >}}。
1056
1062
* 用于升级节点的 kubeadm 版本必须为 {{< skew currentVersionAddMinor -1 >}} 或 {{< skew currentVersion >}}。
1057
1063
@@ -1096,8 +1102,8 @@ Workarounds:
1096
1102
[Options for Highly Available topology](/docs/setup/production-environment/tools/kubeadm/ha-topology/) to pick a cluster
1097
1103
topology that provides [high-availability](/docs/setup/production-environment/tools/kubeadm/high-availability/).
1098
1104
-->
1099
- * 使用多个控制平面节点。你可以阅读
1100
- [ 可选的高可用性拓扑] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/ha-topology/ ) 选择集群拓扑提供的
1105
+ * 使用多个控制平面节点。
1106
+ 你可以阅读 [ 可选的高可用性拓扑] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/ha-topology/ ) 选择集群拓扑提供的
1101
1107
[ 高可用性] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/high-availability/ ) 。
1102
1108
1103
1109
<!--
@@ -1107,8 +1113,7 @@ Workarounds:
1107
1113
1108
1114
<!--
1109
1115
kubeadm deb/rpm packages and binaries are built for amd64, arm (32-bit), arm64, ppc64le, and s390x
1110
- following the [multi-platform
1111
- proposal](https://git.k8s.io/design-proposals-archive/multi-platform.md).
1116
+ following the [multi-platform proposal](https://git.k8s.io/design-proposals-archive/multi-platform.md).
1112
1117
-->
1113
1118
kubeadm deb/rpm 软件包和二进制文件是为 amd64、arm (32-bit)、arm64、ppc64le 和 s390x
1114
1119
构建的遵循[ 多平台提案] ( https://git.k8s.io/design-proposals-archive/multi-platform.md ) 。
@@ -1141,9 +1146,9 @@ If you are running into difficulties with kubeadm, please consult our
1141
1146
<!-- discussion -->
1142
1147
1143
1148
<!--
1144
- ## What's next {#whats-next }
1149
+ ## {{% heading "whatsnext" %} }
1145
1150
-->
1146
- ## 下一步 {#whats-next }
1151
+ ## {{% heading "whatsnext" %} }
1147
1152
1148
1153
<!--
1149
1154
* Verify that your cluster is running properly with [Sonobuoy](https://github.com/heptio/sonobuoy)
0 commit comments