@@ -95,11 +95,11 @@ slightly as the tool evolves, but the overall implementation should be pretty st
95
95
` kubeadm ` 工具的整体功能状态为一般可用性(GA)。一些子功能仍在积极开发中。
96
96
随着工具的发展,创建集群的实现可能会略有变化,但总体实现应相当稳定。
97
97
98
+ {{< note >}}
98
99
<!--
99
100
Any commands under `kubeadm alpha` are, by definition, supported on an alpha level.
100
101
-->
101
- {{< note >}}
102
- 根据定义,在 ` kubeadm alpha ` 下的所有命令均在 alpha 级别上受支持。
102
+ 根据定义,在 ` kubeadm alpha ` 下的所有命令均在 Alpha 级别上受支持。
103
103
{{< /note >}}
104
104
105
105
<!-- steps -->
@@ -134,6 +134,7 @@ For detailed instructions and other prerequisites, see [Installing kubeadm](/doc
134
134
在所有主机上安装 {{< glossary_tooltip term_id="container-runtime" text="容器运行时" >}} 和 kubeadm。
135
135
详细说明和其他前提条件,请参见[ 安装 kubeadm] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ ) 。
136
136
137
+ {{< note >}}
137
138
<!--
138
139
If you have already installed kubeadm, run
139
140
`apt-get update && apt-get upgrade` or
@@ -143,7 +144,6 @@ When you upgrade, the kubelet restarts every few seconds as it waits in a crashl
143
144
kubeadm to tell it what to do. This crashloop is expected and normal.
144
145
After you initialize your control-plane, the kubelet runs normally.
145
146
-->
146
- {{< note >}}
147
147
如果你已经安装了kubeadm,执行 ` apt-get update && apt-get upgrade ` 或 ` yum update `
148
148
以获取 kubeadm 的最新版本。
149
149
@@ -193,8 +193,8 @@ The control-plane node is the machine where the control plane components run, in
193
193
communicates with).
194
194
-->
195
195
控制平面节点是运行控制平面组件的机器,
196
- 包括 {{< glossary_tooltip term_id="etcd" >}} (集群数据库)
197
- 和 {{< glossary_tooltip text="API Server " term_id="kube-apiserver" >}}
196
+ 包括 {{< glossary_tooltip term_id="etcd" >}}(集群数据库)
197
+ 和 {{< glossary_tooltip text="API 服务器 " term_id="kube-apiserver" >}}
198
198
(命令行工具 {{< glossary_tooltip text="kubectl" term_id="kubectl" >}} 与之通信)。
199
199
200
200
<!--
@@ -230,7 +230,7 @@ must specify an IPv6 address, for example `--apiserver-advertise-address=2001:db
230
230
1 . (可选)除非另有说明,否则 ` kubeadm ` 使用与默认网关关联的网络接口来设置此控制平面节点 API server 的广播地址。
231
231
要使用其他网络接口,请为 ` kubeadm init ` 设置 ` --apiserver-advertise-address=<ip-address> ` 参数。
232
232
要部署使用 IPv6 地址的 Kubernetes 集群,
233
- 必须指定一个 IPv6 地址,例如 ` --apiserver-advertise-address=2001:db8::101 `
233
+ 必须指定一个 IPv6 地址,例如 ` --apiserver-advertise-address=2001:db8::101 ` 。
234
234
235
235
<!--
236
236
To initialize the control-plane node run:
@@ -315,8 +315,8 @@ for control plane components and etcd server, provide extra arguments to each co
315
315
To reconfigure a cluster that has already been created see
316
316
[Reconfiguring a kubeadm cluster](/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure).
317
317
-->
318
- 要重新配置一个已经创建的集群,请参见
319
- [ 重新配置一个 kubeadm 集群] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure ) 。
318
+ 要重新配置一个已经创建的集群,
319
+ 请参见 [ 重新配置一个 kubeadm 集群] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure ) 。
320
320
321
321
<!--
322
322
To run `kubeadm init` again, you must first [tear down the cluster](#tear-down).
@@ -336,8 +336,8 @@ is ready to run Kubernetes. These prechecks expose warnings and exit on errors.
336
336
then downloads and installs the cluster control plane components. This may take several minutes.
337
337
After it finishes you should see:
338
338
-->
339
- ` kubeadm init ` 首先运行一系列预检查以确保机器
340
- 准备运行 Kubernetes。 这些预检查会显示警告并在错误时退出。然后 ` kubeadm init `
339
+ ` kubeadm init ` 首先运行一系列预检查以确保机器为运行 Kubernetes 准备就绪。
340
+ 这些预检查会显示警告并在错误时退出。然后 ` kubeadm init `
341
341
下载并安装集群控制平面组件。这可能会需要几分钟。
342
342
完成之后你应该看到:
343
343
@@ -464,8 +464,9 @@ Cluster DNS (CoreDNS) will not start up before a network is installed.**
464
464
Make sure that your Pod network plugin supports RBAC, and so do any manifests
465
465
that you use to deploy it.
466
466
-->
467
- - 默认情况下,` kubeadm ` 将集群设置为使用和强制使用 [ RBAC] ( /zh-cn/docs/reference/access-authn-authz/rbac/ ) (基于角色的访问控制)。
468
- 确保你的 Pod 网络插件支持 RBAC,以及用于部署它的 manifests 也是如此。
467
+ - 默认情况下,` kubeadm ` 将集群设置为使用和强制使用
468
+ [ RBAC] ( /zh-cn/docs/reference/access-authn-authz/rbac/ ) (基于角色的访问控制)。
469
+ 确保你的 Pod 网络插件支持 RBAC,以及用于部署它的清单也是如此。
469
470
470
471
<!--
471
472
- If you want to use IPv6--either dual-stack, or single-stack IPv6 only
@@ -478,12 +479,12 @@ Cluster DNS (CoreDNS) will not start up before a network is installed.**
478
479
IPv6 支持已在 CNI [ v0.6.0] ( https://github.com/containernetworking/cni/releases/tag/v0.6.0 ) 版本中添加。
479
480
{{< /caution >}}
480
481
482
+ {{< note >}}
481
483
<!--
482
484
Kubeadm should be CNI agnostic and the validation of CNI providers is out of the scope of our current e2e testing.
483
485
If you find an issue related to a CNI plugin you should log a ticket in its respective issue
484
486
tracker instead of the kubeadm or kubernetes issue trackers.
485
487
-->
486
- {{< note >}}
487
488
kubeadm 应该是与 CNI 无关的,对 CNI 驱动进行验证目前不在我们的端到端测试范畴之内。
488
489
如果你发现与 CNI 插件相关的问题,应在其各自的问题跟踪器中记录而不是在 kubeadm
489
490
或 kubernetes 问题跟踪器中记录。
@@ -530,13 +531,12 @@ If your network is not working or CoreDNS is not in the `Running` state, check o
530
531
[troubleshooting guide](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)
531
532
for `kubeadm`.
532
533
-->
533
- 如果你的网络无法正常工作或 CoreDNS 不在“运行中” 状态,请查看 ` kubeadm ` 的
534
- [ 故障排除指南] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/ ) 。
534
+ 如果你的网络无法正常工作或 CoreDNS 不在 ` Running ` 状态,请查看 ` kubeadm `
535
+ 的 [ 故障排除指南] ( /zh-cn/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/ ) 。
535
536
536
537
<!--
537
538
### Managed node labels
538
539
-->
539
-
540
540
### 托管节点标签 {#managed-node-labels}
541
541
542
542
<!--
@@ -548,7 +548,7 @@ a privileged client after a node has been created. To do that manually you can d
548
548
and ensure it is using a privileged kubeconfig such as the kubeadm managed `/etc/kubernetes/admin.conf`.
549
549
-->
550
550
默认情况下,kubeadm 启用 [ NodeRestriction] ( /zh-cn/docs/reference/access-authn-authz/admission-controllers/#noderestriction )
551
- 准入控制器来限制 kubelets 在节点注册时可以应用哪些标签。准入控制器文档描述 kubelet ` --node-labels ` 选项允许使用哪些标签。
551
+ 准入控制器来限制 kubelet 在节点注册时可以应用哪些标签。准入控制器文档描述 kubelet ` --node-labels ` 选项允许使用哪些标签。
552
552
其中 ` node-role.kubernetes.io/control-plane ` 标签就是这样一个受限制的标签,
553
553
kubeadm 在节点创建后使用特权客户端手动应用此标签。
554
554
你可以使用一个有特权的 kubeconfig,比如由 kubeadm 管理的 ` /etc/kubernetes/admin.conf ` ,
@@ -568,15 +568,17 @@ for example for a single machine Kubernetes cluster, run:
568
568
如果你希望能够在控制平面节点上调度 Pod,例如单机 Kubernetes 集群,请运行:
569
569
570
570
``` bash
571
- kubectl taint nodes --all node-role.kubernetes.io/control-plane- node-role.kubernetes.io/master-
571
+ kubectl taint nodes --all node-role.kubernetes.io/control-plane-
572
572
```
573
+
573
574
<!--
574
575
The output will look something like:
575
576
-->
576
577
输出看起来像:
577
578
578
- ``` console
579
+ ```
579
580
node "test-01" untainted
581
+ ...
580
582
```
581
583
582
584
<!--
@@ -675,10 +677,10 @@ The output is similar to:
675
677
8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78
676
678
```
677
679
680
+ {{< note >}}
678
681
<!--
679
682
To specify an IPv6 tuple for `<control-plane-host>:<control-plane-port>`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`.
680
683
-->
681
- {{< note >}}
682
684
要为 ` <control-plane-host>:<control-plane-port> ` 指定 IPv6 元组,必须将 IPv6 地址括在方括号中,例如:` [2001:db8::101]:2073 `
683
685
{{< /note >}}
684
686
@@ -706,12 +708,12 @@ nodes` when run on the control-plane node.
706
708
-->
707
709
几秒钟后,当你在控制平面节点上执行 ` kubectl get nodes ` ,你会注意到该节点出现在输出中。
708
710
711
+ {{< note >}}
709
712
<!--
710
713
As the cluster nodes are usually initialized sequentially, the CoreDNS Pods are likely to all run
711
714
on the first control-plane node. To provide higher availability, please rebalance the CoreDNS Pods
712
715
with `kubectl -n kube-system rollout restart deployment coredns` after at least one new node is joined.
713
716
-->
714
- {{< note >}}
715
717
由于集群节点通常是按顺序初始化的,CoreDNS Pod 很可能都运行在第一个控制面节点上。
716
718
为了提供更高的可用性,请在加入至少一个新节点后
717
719
使用 ` kubectl -n kube-system rollout restart deployment coredns ` 命令,重新平衡这些 CoreDNS Pod。
@@ -734,6 +736,8 @@ to your workstation like this:
734
736
scp root@< control-plane-host> :/etc/kubernetes/admin.conf .
735
737
kubectl --kubeconfig ./admin.conf get nodes
736
738
```
739
+
740
+ {{< note >}}
737
741
<!--
738
742
The example above assumes SSH access is enabled for root. If that is not the
739
743
case, you can copy the `admin.conf` file to be accessible by some other user
@@ -747,7 +751,6 @@ command. That command will print out a KubeConfig file to STDOUT which you
747
751
should save to a file and distribute to your user. After that, grant
748
752
privileges by using `kubectl create (cluster)rolebinding`.
749
753
-->
750
- {{< note >}}
751
754
上面的示例假定为 root 用户启用了 SSH 访问。如果不是这种情况,
752
755
你可以使用 ` scp ` 将 ` admin.conf ` 文件复制给其他允许访问的用户。
753
756
@@ -773,6 +776,7 @@ If you want to connect to the API Server from outside the cluster you can use
773
776
scp root@< control-plane-host> :/etc/kubernetes/admin.conf .
774
777
kubectl --kubeconfig ./admin.conf proxy
775
778
```
779
+
776
780
<!--
777
781
You can now access the API Server locally at `http://localhost:8001/api/v1`
778
782
-->
@@ -789,7 +793,8 @@ switch those off and do no further clean up. You can use
789
793
`kubectl config delete-cluster` to delete your local references to the
790
794
cluster.
791
795
-->
792
- 如果你在集群中使用了一次性服务器进行测试,则可以关闭这些服务器,而无需进一步清理。你可以使用 ` kubectl config delete-cluster ` 删除对集群的本地引用。
796
+ 如果你在集群中使用了一次性服务器进行测试,则可以关闭这些服务器,而无需进一步清理。
797
+ 你可以使用 ` kubectl config delete-cluster ` 删除对集群的本地引用。
793
798
794
799
<!--
795
800
However, if you want to deprovision your cluster more cleanly, you should
@@ -846,7 +851,7 @@ Now remove the node:
846
851
现在删除节点:
847
852
848
853
``` bash
849
- kubectl delete node < node name >
854
+ kubectl delete node < 节点名称 >
850
855
```
851
856
852
857
<!--
@@ -871,7 +876,8 @@ See the [`kubeadm reset`](/docs/reference/setup-tools/kubeadm/kubeadm-reset/)
871
876
reference documentation for more information about this subcommand and its
872
877
options.
873
878
-->
874
- 有关此子命令及其选项的更多信息,请参见 [ ` kubeadm reset ` ] ( /zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-reset/ ) 参考文档。
879
+ 有关此子命令及其选项的更多信息,请参见
880
+ [ ` kubeadm reset ` ] ( /zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-reset/ ) 参考文档。
875
881
876
882
<!-- discussion -->
877
883
@@ -903,8 +909,7 @@ options.
903
909
* 有关 Pod 网络附加组件的更多列表,请参见[ 集群网络] ( /zh-cn/docs/concepts/cluster-administration/networking/ ) 页面。
904
910
* <a id =" other-addons " />请参阅[ 附加组件列表] ( /zh-cn/docs/concepts/cluster-administration/addons/ ) 以探索其他附加组件,
905
911
包括用于 Kubernetes 集群的日志记录、监视、网络策略、可视化和控制的工具。
906
- * 配置集群如何处理集群事件的日志以及
907
- 在 Pod 中运行的应用程序。
912
+ * 配置集群如何处理集群事件的日志以及在 Pod 中运行的应用程序。
908
913
有关所涉及内容的概述,请参见[ 日志架构] ( /zh-cn/docs/concepts/cluster-administration/logging/ ) 。
909
914
910
915
<!--
@@ -946,7 +951,6 @@ match the kubeadm version with the versions of the control plane components, kub
946
951
<!--
947
952
### kubeadm's skew against the Kubernetes version
948
953
-->
949
-
950
954
### kubeadm 中的 Kubernetes 版本偏差 {#kubeadm-s-skew-against-the-kubernetes-version}
951
955
952
956
<!--
@@ -1074,10 +1078,10 @@ Workarounds:
1074
1078
解决方法:
1075
1079
1076
1080
<!--
1077
- * Regularly [back up etcd](https://coreos.com/etcd/ docs/latest/admin_guide.html ). The
1081
+ * Regularly [back up etcd](https://etcd.io/ docs/v3.5/op-guide/recovery/ ). The
1078
1082
etcd data directory configured by kubeadm is at `/var/lib/etcd` on the control-plane node.
1079
1083
-->
1080
- * 定期[ 备份 etcd] ( https://coreos.com/etcd/ docs/latest/admin_guide.html ) 。
1084
+ * 定期[ 备份 etcd] ( https://etcd.io/ docs/v3.5/op-guide/recovery/ ) 。
1081
1085
kubeadm 配置的 etcd 数据目录位于控制平面节点上的 ` /var/lib/etcd ` 中。
1082
1086
1083
1087
<!--
0 commit comments