Skip to content

Commit e053883

Browse files
authored
Merge pull request #30219 from calvin0327/fix-zh-kubeadm
[zh] update the kubeadm website
2 parents afbc5fc + 10b2b47 commit e053883

File tree

4 files changed

+53
-35
lines changed

4 files changed

+53
-35
lines changed

content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ weight: 30
2121
`kubeadm` also supports other cluster
2222
lifecycle functions, such as [bootstrap tokens](/docs/reference/access-authn-authz/bootstrap-tokens/) and cluster upgrades.
2323
-->
24-
<img src="/images/kubeadm-stacked-color.png" align="right" width="150px">使用 `kubeadm`,你
25-
能创建一个符合最佳实践的最小化 Kubernetes 集群。事实上,你可以使用 `kubeadm` 配置一个通过 [Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification) 的集群。
24+
<img src="/images/kubeadm-stacked-color.png" align="right" width="150px">使用 `kubeadm`,你能创建一个符合最佳实践的最小化 Kubernetes 集群。事实上,你可以使用 `kubeadm` 配置一个通过 [Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification) 的集群。
2625
`kubeadm` 还支持其他集群生命周期功能,
2726
例如 [启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/) 和集群升级。
2827

@@ -152,6 +151,33 @@ apt-get upgrade` 或 `yum update` 以获取 kubeadm 的最新版本。
152151
初始化控制平面后,kubelet 将正常运行。
153152
{{< /note >}}
154153

154+
<!--
155+
### Preparing the required container images
156+
-->
157+
### 准备所需的容器镜像
158+
159+
<!--
160+
This step is optional and only applies in case you wish `kubeadm init` and `kubeadm join`
161+
to not download the default container images which are hosted at `k8s.gcr.io`.
162+
163+
Kubeadm has commands that can help you pre-pull the required images
164+
when creating a cluster without an internet connection on its nodes.
165+
See [Running kubeadm without an internet connection](/docs/reference/setup-tools/kubeadm/kubeadm-init#without-internet-connection) for more details.
166+
167+
Kubeadm allows you to use a custom image repository for the required images.
168+
See [Using custom images](docs/reference/setup-tools/kubeadm/kubeadm-init#custom-images)
169+
for more details.
170+
-->
171+
这个步骤是可选的,只适用于你希望 `kubeadm init``kubeadm join` 不去下载存放在 `k8s.gcr.io` 上的默认的容器镜像的情况。
172+
173+
当你在离线的节点上创建一个集群的时候,Kubeadm 有一些命令可以帮助你预拉取所需的镜像。
174+
阅读[离线运行 kubeadm](docs/reference/setup-tools/kubeadm/kubeadm-init#custom-images)
175+
获取更多的详情。
176+
177+
Kubeadm 允许你给所需要的镜像指定一个自定义的镜像仓库。
178+
阅读[使用自定义镜像](docs/reference/setup-tools/kubeadm/kubeadm-init#custom-images)
179+
获取更多的详情。
180+
155181
<!--
156182
### Initializing your control-plane node
157183
-->
@@ -186,13 +212,11 @@ with the default gateway to set the advertise address for this particular contro
186212
To use a different network interface, specify the `--apiserver-advertise-address=<ip-address>` argument
187213
to `kubeadm init`. To deploy an IPv6 Kubernetes cluster using IPv6 addressing, you
188214
must specify an IPv6 address, for example `--apiserver-advertise-address=fd00::101`
189-
1. (Optional) Run `kubeadm config images pull` prior to `kubeadm init` to verify
190-
connectivity to the gcr.io container image registry.
191215
-->
192216
1. (推荐)如果计划将单个控制平面 kubeadm 集群升级成高可用,
193217
你应该指定 `--control-plane-endpoint` 为所有控制平面节点设置共享端点。
194218
端点可以是负载均衡器的 DNS 名称或 IP 地址。
195-
1. 选择一个Pod网络插件,并验证是否需要为 `kubeadm init` 传递参数。
219+
1. 选择一个 Pod 网络插件,并验证是否需要为 `kubeadm init` 传递参数。
196220
根据你选择的第三方网络插件,你可能需要设置 `--pod-network-cidr` 的值。
197221
请参阅 [安装Pod网络附加组件](#pod-network)
198222
1. (可选)从版本1.14开始,`kubeadm` 尝试使用一系列众所周知的域套接字路径来检测 Linux 上的容器运行时。
@@ -203,8 +227,6 @@ connectivity to the gcr.io container image registry.
203227
要使用其他网络接口,请为 `kubeadm init` 设置 `--apiserver-advertise-address=<ip-address>` 参数。
204228
要部署使用 IPv6 地址的 Kubernetes 集群,
205229
必须指定一个 IPv6 地址,例如 `--apiserver-advertise-address=fd00::101`
206-
1. (可选)在 `kubeadm init` 之前运行 `kubeadm config images pull`,以验证与 gcr.io 容器镜像仓库的连通性。
207-
208230

209231
<!--
210232
To initialize the control-plane node run:
@@ -437,7 +459,7 @@ Cluster DNS (CoreDNS) will not start up before a network is installed.**
437459
IPv6 support was added to CNI in [v0.6.0](https://github.com/containernetworking/cni/releases/tag/v0.6.0).
438460
-->
439461
- 如果要为集群使用 IPv6(双协议栈或仅单协议栈 IPv6 网络),
440-
请确保你的Pod网络插件支持 IPv6。
462+
请确保你的 Pod 网络插件支持 IPv6。
441463
IPv6 支持已在 CNI [v0.6.0](https://github.com/containernetworking/cni/releases/tag/v0.6.0) 版本中添加。
442464
{{< /caution >}}
443465

@@ -492,7 +514,8 @@ If your network is not working or CoreDNS is not in the `Running` state, check o
492514
[troubleshooting guide](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)
493515
for `kubeadm`.
494516
-->
495-
如果您的网络无法正常工作或CoreDNS不在“运行中”状态,请查看 `kubeadm`[故障排除指南](/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)
517+
如果您的网络无法正常工作或 CoreDNS 不在“运行中”状态,请查看 `kubeadm`
518+
[故障排除指南](/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)
496519

497520

498521
<!--
@@ -829,15 +852,15 @@ options.
829852
See [Logging Architecture](/docs/concepts/cluster-administration/logging/) for
830853
an overview of what is involved.
831854
-->
832-
* 使用 [Sonobuoy](https://github.com/heptio/sonobuoy) 验证集群是否正常运行
833-
* <a id="lifecycle" />有关使用kubeadm升级集群的详细信息,请参阅[升级 kubeadm 集群](/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
834-
*[kubeadm 参考文档](/zh/docs/reference/setup-tools/kubeadm)中了解有关高级 `kubeadm` 用法的信息
835-
* 了解有关Kubernetes[概念](/zh/docs/concepts/)[`kubectl`](/zh/docs/reference/kubectl/overview/)的更多信息。
836-
* 有关Pod网络附加组件的更多列表,请参见[集群网络](/zh/docs/concepts/cluster-administration/networking/)页面。
855+
* 使用 [Sonobuoy](https://github.com/heptio/sonobuoy) 验证集群是否正常运行
856+
* <a id="lifecycle"/>有关使用 kubeadm 升级集群的详细信息,请参阅[升级 kubeadm 集群](/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
857+
* [kubeadm 参考文档](/zh/docs/reference/setup-tools/kubeadm)中了解有关高级 `kubeadm` 用法的信息
858+
* 了解有关 Kubernetes [概念](/zh/docs/concepts/) [`kubectl`](/zh/docs/reference/kubectl/overview/) 的更多信息。
859+
* 有关 Pod 网络附加组件的更多列表,请参见[集群网络](/zh/docs/concepts/cluster-administration/networking/)页面。
837860
* <a id="other-addons" />请参阅[附加组件列表](/zh/docs/concepts/cluster-administration/addons/)以探索其他附加组件,
838861
包括用于 Kubernetes 集群的日志记录,监视,网络策略,可视化和控制的工具。
839862
* 配置集群如何处理集群事件的日志以及
840-
在Pods中运行的应用程序
863+
在 Pods 中运行的应用程序
841864
有关所涉及内容的概述,请参见[日志架构](/zh/docs/concepts/cluster-administration/logging/)
842865

843866
<!--
@@ -879,7 +902,7 @@ The `kubeadm` tool of version v{{< skew latestVersion >}} may deploy clusters wi
879902
<!--
880903
Due to that we can't see into the future, kubeadm CLI v{{< skew latestVersion >}} may or may not be able to deploy v{{< skew nextMinorVersion >}} clusters.
881904
-->
882-
由于没有未来,kubeadm CLI v{{< skew latestVersion >}} 可能会或可能无法部署 v{{< skew nextMinorVersion >}} 集群。
905+
由于我们不能预见未来,kubeadm CLI v{{< skew latestVersion >}} 可能会或可能无法部署 v{{< skew nextMinorVersion >}} 集群。
883906

884907
<!--
885908
These resources provide more information on supported version skew between kubelets and the control plane, and other Kubernetes components:
@@ -956,9 +979,7 @@ Only some of the network providers offer solutions for all platforms. Please con
956979
network providers above or the documentation from each provider to figure out whether the provider
957980
supports your chosen platform.
958981
-->
959-
只有一些网络提供商为所有平台提供解决方案。请查阅上方的
960-
网络提供商清单或每个提供商的文档以确定提供商是否
961-
支持你选择的平台。
982+
只有一些网络提供商为所有平台提供解决方案。请查阅上方的网络提供商清单或每个提供商的文档以确定提供商是否支持你选择的平台。
962983

963984
<!--
964985
## Troubleshooting {#troubleshooting}

content/zh/docs/setup/production-environment/tools/kubeadm/high-availability.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ option. Your cluster requirements may need a different configuration.
129129
- Make sure the address of the load balancer always matches
130130
the address of kubeadm's `ControlPlaneEndpoint`.
131131
132-
- Read the [Options for Software Load Balancing](https://github.com/kubernetes/kubeadm/blob/master/docs/ha-considerations.md#options-for-software-load-balancing)
132+
- Read the [Options for Software Load Balancing](https://git.k8s.io/kubeadm/docs/ha-considerations.md#options-for-software-load-balancing)
133133
guide for more details.
134134
-->
135135
1. 创建一个名为 kube-apiserver 的负载均衡器解析 DNS。
@@ -146,8 +146,7 @@ option. Your cluster requirements may need a different configuration.
146146

147147
- 确保负载均衡器的地址始终匹配 kubeadm 的 `ControlPlaneEndpoint` 地址。
148148

149-
- 阅读[软件负载平衡选项指南](https://github.com/kubernetes/kubeadm/blob/master/docs/ha-considerations.md#options-for-software-load-balancing)
150-
以获取更多详细信息。
149+
- 阅读[软件负载平衡选项指南](https://git.k8s.io/kubeadm/docs/ha-considerations.md#options-for-software-load-balancing)以获取更多详细信息。
151150

152151
<!--
153152
1. Add the first control plane nodes to the load balancer and test the
@@ -216,12 +215,11 @@ option. Your cluster requirements may need a different configuration.
216215
{{< note >}}
217216
<!--
218217
The `kubeadm init` flags `--config` and `--certificate-key` cannot be mixed, therefore if you want
219-
to use the [kubeadm configuration](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) you must add the `certificateKey` field in the appropriate config locations (under `InitConfiguration` and `JoinConfiguration: controlPlane`).
218+
to use the [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta3/) you must add the `certificateKey` field in the appropriate config locations (under `InitConfiguration` and `JoinConfiguration: controlPlane`).
220219
-->
221220
标志 `kubeadm init``--config``--certificate-key` 不能混合使用,
222221
因此如果你要使用
223-
[kubeadm 配置](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3),
224-
你必须在相应的配置文件
222+
[kubeadm 配置](/docs/reference/config-api/kubeadm-config.v1beta3/),你必须在相应的配置文件
225223
(位于 `InitConfiguration``JoinConfiguration: controlPlane`)添加 `certificateKey` 字段。
226224
{{< /note >}}
227225

content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ If the reload and restart are successful, the normal `kubeadm init` workflow con
230230
ConfigMap 名为 `kubelet-config-1.X`,其中 `X` 是你正在初始化的 kubernetes 版本的次版本。
231231
在集群中所有 kubelet 的基准集群范围内配置,将 kubelet 配置文件写入 `/etc/kubernetes/kubelet.conf` 中。
232232
此配置文件指向允许 kubelet 与 API 服务器通信的客户端证书。
233-
这解决了 [将集群级配置传播到每个 kubelet](#propagating-cluster-level-configuration-to-each-kubelet)的需求。
233+
这解决了[将集群级配置传播到每个 kubelet](#propagating-cluster-level-configuration-to-each-kubelet) 的需求。
234234

235235
该文档 [提供特定实例的配置详细信息](#providing-instance-specific-configuration-details) 是第二种解决模式,
236236
kubeadm 将环境文件写入 `/var/lib/kubelet/kubeadm-flags.env`,其中包含了一个标志列表,

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
435435
When using DigitalOcean, it can be the public one (assigned to `eth0`) or
436436
the private one (assigned to `eth1`) should you want to use the optional
437437
private network. The `kubeletExtraArgs` section of the kubeadm
438-
[`NodeRegistrationOptions` structure](/docs/reference/config-api/kubeadm-config.v1beta2/#kubeadm-k8s-io-v1beta2-NodeRegistrationOptions)
438+
[`NodeRegistrationOptions` structure](/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions)
439439
can be used for this.
440440
441441
Then restart `kubelet`:
@@ -468,7 +468,7 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
468468

469469
解决方法是通知 `kubelet` 使用哪个 `--node-ip`。当使用 Digital Ocean 时,可以是公网IP(分配给 `eth0`的),
470470
或者是私网IP(分配给 `eth1` 的)。私网 IP 是可选的。
471-
[kubadm `NodeRegistrationOptions` 结构](/zh/docs/reference/config-api/kubeadm-config.v1beta2/#kubeadm-k8s-io-v1beta2-NodeRegistrationOptions)
471+
[kubadm `NodeRegistrationOptions` 结构](/zh/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions)
472472
`KubeletExtraArgs` 部分被用来处理这种情况。
473473

474474
然后重启 `kubelet`
@@ -595,7 +595,7 @@ Alternatively, you can try separating the `key=value` pairs like so:
595595
`-apiserver-extra-args "enable-admission-plugins=LimitRanger,enable-admission-plugins=NamespaceExists"`
596596
but this will result in the key `enable-admission-plugins` only having the value of `NamespaceExists`.
597597
598-
A known workaround is to use the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/).
598+
A known workaround is to use the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/).
599599
-->
600600
## 无法将以逗号分隔的值列表传递给 `--component-extra-args` 标志内的参数
601601

@@ -613,7 +613,7 @@ kube-apiserver 这样的控制平面组件。然而,由于解析 (`mapStringSt
613613
但这将导致键 `enable-admission-plugins` 仅有值 `NamespaceExists`
614614

615615
已知的解决方法是使用 kubeadm
616-
[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta2/)
616+
[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta3/)
617617

618618
<!--
619619
## kube-proxy scheduled before node is initialized by cloud-controller-manager
@@ -679,13 +679,12 @@ for the feature to work.
679679

680680
<!--
681681
To workaround this issue you can configure the flex-volume directory using the kubeadm
682-
[configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3).
682+
[configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/).
683683
684684
On the primary control-plane Node (created using `kubeadm init`) pass the following
685685
file using `--config`:
686686
-->
687-
为了解决这个问题,你可以使用 kubeadm 的[配置文件](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3)
688-
来配置 FlexVolume 的目录。
687+
为了解决这个问题,你可以使用 kubeadm 的[配置文件](/docs/reference/config-api/kubeadm-config.v1beta3/) 来配置 FlexVolume 的目录。
689688

690689
在(使用 `kubeadm init` 创建的)主控制节点上,使用 `-config`
691690
参数传入如下文件:
@@ -775,8 +774,8 @@ If you want to use TLS between the metrics-server and the kubelet there is a pro
775774
since kubeadm deploys a self-signed serving certificate for the kubelet. This can cause the following errors
776775
on the side of the metrics-server:
777776
-->
778-
如果你需要在 metrics-server 和 kubelt 之间使用 TLS,会有一个问题,
779-
kubeadm 为 kubelt 部署的是自签名的服务证书。这可能会导致 metrics-server
777+
如果你需要在 metrics-server 和 kubelet 之间使用 TLS,会有一个问题,
778+
kubeadm 为 kubelet 部署的是自签名的服务证书。这可能会导致 metrics-server
780779
端报告下面的错误信息:
781780

782781
```

0 commit comments

Comments
 (0)