fix the kubeadm websit.
This commit is contained in:
parent
0a0609b234
commit
10b2b47d24
|
@ -21,8 +21,7 @@ weight: 30
|
|||
`kubeadm` also supports other cluster
|
||||
lifecycle functions, such as [bootstrap tokens](/docs/reference/access-authn-authz/bootstrap-tokens/) and cluster upgrades.
|
||||
-->
|
||||
<img src="/images/kubeadm-stacked-color.png" align="right" width="150px">使用 `kubeadm`,你
|
||||
能创建一个符合最佳实践的最小化 Kubernetes 集群。事实上,你可以使用 `kubeadm` 配置一个通过 [Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification) 的集群。
|
||||
<img src="/images/kubeadm-stacked-color.png" align="right" width="150px">使用 `kubeadm`,你能创建一个符合最佳实践的最小化 Kubernetes 集群。事实上,你可以使用 `kubeadm` 配置一个通过 [Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification) 的集群。
|
||||
`kubeadm` 还支持其他集群生命周期功能,
|
||||
例如 [启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/) 和集群升级。
|
||||
|
||||
|
@ -152,6 +151,33 @@ apt-get upgrade` 或 `yum update` 以获取 kubeadm 的最新版本。
|
|||
初始化控制平面后,kubelet 将正常运行。
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
### Preparing the required container images
|
||||
-->
|
||||
### 准备所需的容器镜像
|
||||
|
||||
<!--
|
||||
This step is optional and only applies in case you wish `kubeadm init` and `kubeadm join`
|
||||
to not download the default container images which are hosted at `k8s.gcr.io`.
|
||||
|
||||
Kubeadm has commands that can help you pre-pull the required images
|
||||
when creating a cluster without an internet connection on its nodes.
|
||||
See [Running kubeadm without an internet connection](/docs/reference/setup-tools/kubeadm/kubeadm-init#without-internet-connection) for more details.
|
||||
|
||||
Kubeadm allows you to use a custom image repository for the required images.
|
||||
See [Using custom images](docs/reference/setup-tools/kubeadm/kubeadm-init#custom-images)
|
||||
for more details.
|
||||
-->
|
||||
这个步骤是可选的,只适用于你希望 `kubeadm init` 和 `kubeadm join` 不去下载存放在 `k8s.gcr.io` 上的默认的容器镜像的情况。
|
||||
|
||||
当你在离线的节点上创建一个集群的时候,Kubeadm 有一些命令可以帮助你预拉取所需的镜像。
|
||||
阅读[离线运行 kubeadm](docs/reference/setup-tools/kubeadm/kubeadm-init#custom-images)
|
||||
获取更多的详情。
|
||||
|
||||
Kubeadm 允许你给所需要的镜像指定一个自定义的镜像仓库。
|
||||
阅读[使用自定义镜像](docs/reference/setup-tools/kubeadm/kubeadm-init#custom-images)
|
||||
获取更多的详情。
|
||||
|
||||
<!--
|
||||
### Initializing your control-plane node
|
||||
-->
|
||||
|
@ -186,8 +212,6 @@ with the default gateway to set the advertise address for this particular contro
|
|||
To use a different network interface, specify the `--apiserver-advertise-address=<ip-address>` argument
|
||||
to `kubeadm init`. To deploy an IPv6 Kubernetes cluster using IPv6 addressing, you
|
||||
must specify an IPv6 address, for example `--apiserver-advertise-address=fd00::101`
|
||||
1. (Optional) Run `kubeadm config images pull` prior to `kubeadm init` to verify
|
||||
connectivity to the gcr.io container image registry.
|
||||
-->
|
||||
1. (推荐)如果计划将单个控制平面 kubeadm 集群升级成高可用,
|
||||
你应该指定 `--control-plane-endpoint` 为所有控制平面节点设置共享端点。
|
||||
|
@ -203,8 +227,6 @@ connectivity to the gcr.io container image registry.
|
|||
要使用其他网络接口,请为 `kubeadm init` 设置 `--apiserver-advertise-address=<ip-address>` 参数。
|
||||
要部署使用 IPv6 地址的 Kubernetes 集群,
|
||||
必须指定一个 IPv6 地址,例如 `--apiserver-advertise-address=fd00::101`
|
||||
1. (可选)在 `kubeadm init` 之前运行 `kubeadm config images pull`,以验证与 gcr.io 容器镜像仓库的连通性。
|
||||
|
||||
|
||||
<!--
|
||||
To initialize the control-plane node run:
|
||||
|
@ -492,7 +514,8 @@ If your network is not working or CoreDNS is not in the `Running` state, check o
|
|||
[troubleshooting guide](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)
|
||||
for `kubeadm`.
|
||||
-->
|
||||
如果您的网络无法正常工作或CoreDNS不在“运行中”状态,请查看 `kubeadm` 的[故障排除指南](/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)。
|
||||
如果您的网络无法正常工作或 CoreDNS 不在“运行中”状态,请查看 `kubeadm` 的
|
||||
[故障排除指南](/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/)。
|
||||
|
||||
|
||||
<!--
|
||||
|
@ -829,9 +852,9 @@ options.
|
|||
See [Logging Architecture](/docs/concepts/cluster-administration/logging/) for
|
||||
an overview of what is involved.
|
||||
-->
|
||||
* 使用 [Sonobuoy](https://github.com/heptio/sonobuoy) 验证集群是否正常运行
|
||||
* 使用 [Sonobuoy](https://github.com/heptio/sonobuoy) 验证集群是否正常运行。
|
||||
* <a id="lifecycle"/>有关使用 kubeadm 升级集群的详细信息,请参阅[升级 kubeadm 集群](/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)。
|
||||
* 在[kubeadm 参考文档](/zh/docs/reference/setup-tools/kubeadm)中了解有关高级 `kubeadm` 用法的信息
|
||||
* 在 [kubeadm 参考文档](/zh/docs/reference/setup-tools/kubeadm)中了解有关高级 `kubeadm` 用法的信息。
|
||||
* 了解有关 Kubernetes [概念](/zh/docs/concepts/)和 [`kubectl`](/zh/docs/reference/kubectl/overview/) 的更多信息。
|
||||
* 有关 Pod 网络附加组件的更多列表,请参见[集群网络](/zh/docs/concepts/cluster-administration/networking/)页面。
|
||||
* <a id="other-addons" />请参阅[附加组件列表](/zh/docs/concepts/cluster-administration/addons/)以探索其他附加组件,
|
||||
|
@ -879,7 +902,7 @@ The `kubeadm` tool of version v{{< skew latestVersion >}} may deploy clusters wi
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
由于没有未来,kubeadm CLI v{{< skew latestVersion >}} 可能会或可能无法部署 v{{< skew nextMinorVersion >}} 集群。
|
||||
由于我们不能预见未来,kubeadm CLI v{{< skew latestVersion >}} 可能会或可能无法部署 v{{< skew nextMinorVersion >}} 集群。
|
||||
|
||||
<!--
|
||||
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
|
|||
network providers above or the documentation from each provider to figure out whether the provider
|
||||
supports your chosen platform.
|
||||
-->
|
||||
只有一些网络提供商为所有平台提供解决方案。请查阅上方的
|
||||
网络提供商清单或每个提供商的文档以确定提供商是否
|
||||
支持你选择的平台。
|
||||
只有一些网络提供商为所有平台提供解决方案。请查阅上方的网络提供商清单或每个提供商的文档以确定提供商是否支持你选择的平台。
|
||||
|
||||
<!--
|
||||
## Troubleshooting {#troubleshooting}
|
||||
|
|
|
@ -129,7 +129,7 @@ option. Your cluster requirements may need a different configuration.
|
|||
- Make sure the address of the load balancer always matches
|
||||
the address of kubeadm's `ControlPlaneEndpoint`.
|
||||
|
||||
- Read the [Options for Software Load Balancing](https://github.com/kubernetes/kubeadm/blob/master/docs/ha-considerations.md#options-for-software-load-balancing)
|
||||
- Read the [Options for Software Load Balancing](https://git.k8s.io/kubeadm/docs/ha-considerations.md#options-for-software-load-balancing)
|
||||
guide for more details.
|
||||
-->
|
||||
1. 创建一个名为 kube-apiserver 的负载均衡器解析 DNS。
|
||||
|
@ -146,8 +146,7 @@ option. Your cluster requirements may need a different configuration.
|
|||
|
||||
- 确保负载均衡器的地址始终匹配 kubeadm 的 `ControlPlaneEndpoint` 地址。
|
||||
|
||||
- 阅读[软件负载平衡选项指南](https://github.com/kubernetes/kubeadm/blob/master/docs/ha-considerations.md#options-for-software-load-balancing)
|
||||
以获取更多详细信息。
|
||||
- 阅读[软件负载平衡选项指南](https://git.k8s.io/kubeadm/docs/ha-considerations.md#options-for-software-load-balancing)以获取更多详细信息。
|
||||
|
||||
<!--
|
||||
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.
|
|||
{{< note >}}
|
||||
<!--
|
||||
The `kubeadm init` flags `--config` and `--certificate-key` cannot be mixed, therefore if you want
|
||||
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`).
|
||||
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`).
|
||||
-->
|
||||
标志 `kubeadm init`、`--config` 和 `--certificate-key` 不能混合使用,
|
||||
因此如果你要使用
|
||||
[kubeadm 配置](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3),
|
||||
你必须在相应的配置文件
|
||||
[kubeadm 配置](/docs/reference/config-api/kubeadm-config.v1beta3/),你必须在相应的配置文件
|
||||
(位于 `InitConfiguration` 和 `JoinConfiguration: controlPlane`)添加 `certificateKey` 字段。
|
||||
{{< /note >}}
|
||||
|
||||
|
|
|
@ -435,7 +435,7 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
|
|||
When using DigitalOcean, it can be the public one (assigned to `eth0`) or
|
||||
the private one (assigned to `eth1`) should you want to use the optional
|
||||
private network. The `kubeletExtraArgs` section of the kubeadm
|
||||
[`NodeRegistrationOptions` structure](/docs/reference/config-api/kubeadm-config.v1beta2/#kubeadm-k8s-io-v1beta2-NodeRegistrationOptions)
|
||||
[`NodeRegistrationOptions` structure](/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions)
|
||||
can be used for this.
|
||||
|
||||
Then restart `kubelet`:
|
||||
|
@ -468,7 +468,7 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
|
|||
|
||||
解决方法是通知 `kubelet` 使用哪个 `--node-ip`。当使用 Digital Ocean 时,可以是公网IP(分配给 `eth0`的),
|
||||
或者是私网IP(分配给 `eth1` 的)。私网 IP 是可选的。
|
||||
[kubadm `NodeRegistrationOptions` 结构](/zh/docs/reference/config-api/kubeadm-config.v1beta2/#kubeadm-k8s-io-v1beta2-NodeRegistrationOptions)
|
||||
[kubadm `NodeRegistrationOptions` 结构](/zh/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions)
|
||||
的 `KubeletExtraArgs` 部分被用来处理这种情况。
|
||||
|
||||
然后重启 `kubelet`:
|
||||
|
@ -595,7 +595,7 @@ Alternatively, you can try separating the `key=value` pairs like so:
|
|||
`-apiserver-extra-args "enable-admission-plugins=LimitRanger,enable-admission-plugins=NamespaceExists"`
|
||||
but this will result in the key `enable-admission-plugins` only having the value of `NamespaceExists`.
|
||||
|
||||
A known workaround is to use the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/).
|
||||
A known workaround is to use the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/).
|
||||
-->
|
||||
## 无法将以逗号分隔的值列表传递给 `--component-extra-args` 标志内的参数
|
||||
|
||||
|
@ -613,7 +613,7 @@ kube-apiserver 这样的控制平面组件。然而,由于解析 (`mapStringSt
|
|||
但这将导致键 `enable-admission-plugins` 仅有值 `NamespaceExists`。
|
||||
|
||||
已知的解决方法是使用 kubeadm
|
||||
[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta2/)。
|
||||
[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta3/)。
|
||||
|
||||
<!--
|
||||
## kube-proxy scheduled before node is initialized by cloud-controller-manager
|
||||
|
@ -679,13 +679,12 @@ for the feature to work.
|
|||
|
||||
<!--
|
||||
To workaround this issue you can configure the flex-volume directory using the kubeadm
|
||||
[configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3).
|
||||
[configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/).
|
||||
|
||||
On the primary control-plane Node (created using `kubeadm init`) pass the following
|
||||
file using `--config`:
|
||||
-->
|
||||
为了解决这个问题,你可以使用 kubeadm 的[配置文件](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3)
|
||||
来配置 FlexVolume 的目录。
|
||||
为了解决这个问题,你可以使用 kubeadm 的[配置文件](/docs/reference/config-api/kubeadm-config.v1beta3/) 来配置 FlexVolume 的目录。
|
||||
|
||||
在(使用 `kubeadm init` 创建的)主控制节点上,使用 `-config`
|
||||
参数传入如下文件:
|
||||
|
@ -775,8 +774,8 @@ If you want to use TLS between the metrics-server and the kubelet there is a pro
|
|||
since kubeadm deploys a self-signed serving certificate for the kubelet. This can cause the following errors
|
||||
on the side of the metrics-server:
|
||||
-->
|
||||
如果你需要在 metrics-server 和 kubelt 之间使用 TLS,会有一个问题,
|
||||
kubeadm 为 kubelt 部署的是自签名的服务证书。这可能会导致 metrics-server
|
||||
如果你需要在 metrics-server 和 kubelet 之间使用 TLS,会有一个问题,
|
||||
kubeadm 为 kubelet 部署的是自签名的服务证书。这可能会导致 metrics-server
|
||||
端报告下面的错误信息:
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue