Update create-cluster-kubeadm.md

pull/34529/head
yanrong.shi 2022-06-23 21:38:20 +08:00
parent 788a933ab2
commit 1f9c0f0ceb
1 changed files with 63 additions and 63 deletions

View File

@ -34,7 +34,7 @@ Specific cluster deployment tools may place additional restrictions on version s
Kubernetes versions are expressed as **x.y.z**, where **x** is the major version, **y** is the minor version, and **z** is the patch version, following [Semantic Versioning](https://semver.org/) terminology.
For more information, see [Kubernetes Release Versioning](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#kubernetes-release-versioning).
The Kubernetes project maintains release branches for the most recent three minor releases ({{< skew latestVersion >}}, {{< skew prevMinorVersion >}}, {{< skew oldestMinorVersion >}}). Kubernetes 1.19 and newer receive approximately 1 year of patch support. Kubernetes 1.18 and older received approximately 9 months of patch support.
The Kubernetes project maintains release branches for the most recent three minor releases ({{< skew currentVersion >}}, {{< skew currentVersionAddMinor -1 >}}, {{< skew currentVersionAddMinor -2 >}}). Kubernetes 1.19 and newer receive approximately 1 year of patch support. Kubernetes 1.18 and older received approximately 9 months of patch support.
-->
## 支持的版本 {#supported-versions}
@ -43,7 +43,7 @@ Kubernetes 版本以 **x.y.z** 表示,其中 **x** 是主要版本,
更多信息请参见
[Kubernetes 版本发布控制](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#kubernetes-release-versioning)。
Kubernetes 项目维护最近的三个次要版本({{< skew latestVersion >}}、{{< skew prevMinorVersion >}}、{{< skew oldMinorVersion >}})的发布分支。
Kubernetes 项目维护最近的三个次要版本({{< skew currentVersion >}}、{{< skew currentVersionAddMinor -1 >}}、{{< skew oldMinorVersion >}})的发布分支。
Kubernetes 1.19 和更新的版本获得大约 1 年的补丁支持。
Kubernetes 1.18 及更早的版本获得了大约 9 个月的补丁支持。
@ -71,8 +71,8 @@ In [highly-available (HA) clusters](/docs/setup/production-environment/tools/kub
Example:
* newest `kube-apiserver` is at **{{< skew latestVersion >}}**
* other `kube-apiserver` instances are supported at **{{< skew latestVersion >}}** and **{{< skew prevMinorVersion >}}**
* newest `kube-apiserver` is at **{{< skew currentVersion >}}**
* other `kube-apiserver` instances are supported at **{{< skew currentVersion >}}** and **{{< skew currentVersionAddMinor -1 >}}**
-->
## 支持的版本偏差 {#supported-version-skew}
@ -83,8 +83,8 @@ Example:
例如:
* 最新的 `kube-apiserver` 实例处于 **{{< skew latestVersion >}}** 版本
* 其他 `kube-apiserver` 实例支持 **{{< skew latestVersion >}}** 和 **{{< skew prevMinorVersion >}}** 版本
* 最新的 `kube-apiserver` 实例处于 **{{< skew currentVersion >}}** 版本
* 其他 `kube-apiserver` 实例支持 **{{< skew currentVersion >}}** 和 **{{< skew currentVersionAddMinor -1 >}}** 版本
<!--
### kubelet
@ -93,8 +93,8 @@ Example:
Example:
* `kube-apiserver` is at **{{< skew latestVersion >}}**
* `kubelet` is supported at **{{< skew latestVersion >}}**, **{{< skew prevMinorVersion >}}**, and **{{< skew oldestMinorVersion >}}**
* `kube-apiserver` is at **{{< skew currentVersion >}}**
* `kubelet` is supported at **{{< skew currentVersion >}}**, **{{< skew currentVersionAddMinor -1 >}}**, and **{{< skew currentVersionAddMinor -2 >}}**
-->
### kubelet {#kubelet}
@ -102,8 +102,8 @@ Example:
例如:
* `kube-apiserver` 处于 **{{< skew latestVersion >}}** 版本
* `kubelet` 支持 **{{< skew latestVersion >}}**、**{{< skew prevMinorVersion >}}** 和 **{{< skew oldMinorVersion >}}** 版本
* `kube-apiserver` 处于 **{{< skew currentVersion >}}** 版本
* `kubelet` 支持 **{{< skew currentVersion >}}**、**{{< skew currentVersionAddMinor -1 >}}** 和 **{{< skew oldMinorVersion >}}** 版本
{{< note >}}
<!--
@ -115,15 +115,15 @@ If version skew exists between `kube-apiserver` instances in an HA cluster, this
<!--
Example:
* `kube-apiserver` instances are at **{{< skew latestVersion >}}** and **{{< skew prevMinorVersion >}}**
* `kubelet` is supported at **{{< skew prevMinorVersion >}}**, and **{{< skew oldestMinorVersion >}}** (**{{< skew latestVersion >}}** is not supported because that would be newer than the `kube-apiserver` instance at version **{{< skew prevMinorVersion >}}**)
* `kube-apiserver` instances are at **{{< skew currentVersion >}}** and **{{< skew currentVersionAddMinor -1 >}}**
* `kubelet` is supported at **{{< skew currentVersionAddMinor -1 >}}**, and **{{< skew currentVersionAddMinor -2 >}}** (**{{< skew currentVersion >}}** is not supported because that would be newer than the `kube-apiserver` instance at version **{{< skew currentVersionAddMinor -1 >}}**)
-->
例如:
* `kube-apiserver` 实例处于 **{{< skew latestVersion >}}** 和 **{{< skew prevMinorVersion >}}** 版本
* `kubelet` 支持 **{{< skew prevMinorVersion >}}** 和 **{{< skew oldMinorVersion >}}** 版本,
(不支持 **{{< skew latestVersion >}}** 版本,因为这将比
`kube-apiserver` **{{< skew prevMinorVersion >}}** 版本的实例新)
* `kube-apiserver` 实例处于 **{{< skew currentVersion >}}** 和 **{{< skew currentVersionAddMinor -1 >}}** 版本
* `kubelet` 支持 **{{< skew currentVersionAddMinor -1 >}}** 和 **{{< skew oldMinorVersion >}}** 版本,
(不支持 **{{< skew currentVersion >}}** 版本,因为这将比
`kube-apiserver` **{{< skew currentVersionAddMinor -1 >}}** 版本的实例新)
<!--
### kube-controller-manager, kube-scheduler, and cloud-controller-manager
@ -132,8 +132,8 @@ Example:
Example:
* `kube-apiserver` is at **{{< skew latestVersion >}}**
* `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` are supported at **{{< skew latestVersion >}}** and **{{< skew prevMinorVersion >}}**
* `kube-apiserver` is at **{{< skew currentVersion >}}**
* `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` are supported at **{{< skew currentVersion >}}** and **{{< skew currentVersionAddMinor -1 >}}**
-->
### kube-controller-manager、kube-scheduler 和 cloud-controller-manager {#kube-controller-manager-kube-scheduler-and-cloud-controller-manager}
@ -143,9 +143,9 @@ Example:
例如:
* `kube-apiserver` 处于 **{{< skew latestVersion >}}** 版本
* `kube-apiserver` 处于 **{{< skew currentVersion >}}** 版本
* `kube-controller-manager`、`kube-scheduler` 和 `cloud-controller-manager`
支持 **{{< skew latestVersion >}}** 和 **{{< skew prevMinorVersion >}}** 版本
支持 **{{< skew currentVersion >}}** 和 **{{< skew currentVersionAddMinor -1 >}}** 版本
{{< note >}}
<!--
@ -159,19 +159,19 @@ If version skew exists between `kube-apiserver` instances in an HA cluster, and
<!--
Example:
* `kube-apiserver` instances are at **{{< skew latestVersion >}}** and **{{< skew prevMinorVersion >}}**
* `kube-apiserver` instances are at **{{< skew currentVersion >}}** and **{{< skew currentVersionAddMinor -1 >}}**
* `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` communicate with a load balancer that can route to any `kube-apiserver` instance
* `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` are supported at **{{< skew prevMinorVersion >}}** (**{{< skew latestVersion >}}** is not supported because that would be newer than the `kube-apiserver` instance at version **{{< skew prevMinorVersion >}}**)
* `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` are supported at **{{< skew currentVersionAddMinor -1 >}}** (**{{< skew currentVersion >}}** is not supported because that would be newer than the `kube-apiserver` instance at version **{{< skew currentVersionAddMinor -1 >}}**)
-->
例如:
* `kube-apiserver` 实例处于
**{{< skew latestVersion >}}** 和 **{{< skew prevMinorVersion >}}** 版本
**{{< skew currentVersion >}}** 和 **{{< skew currentVersionAddMinor -1 >}}** 版本
* `kube-controller-manager`、`kube-scheduler` 和 `cloud-controller-manager`
与可以路由到任何 `kube-apiserver` 实例的负载均衡器通信
* `kube-controller-manager`、`kube-scheduler` 和 `cloud-controller-manager`
支持 **{{< skew prevMinorVersion >}}** 版本(不支持 **{{< skew latestVersion >}}**
版本,因为它比 **{{< skew prevMinorVersion >}}** 版本的 `kube-apiserver` 实例新)
支持 **{{< skew currentVersionAddMinor -1 >}}** 版本(不支持 **{{< skew currentVersion >}}**
版本,因为它比 **{{< skew currentVersionAddMinor -1 >}}** 版本的 `kube-apiserver` 实例新)
<!--
### kubectl
@ -180,8 +180,8 @@ Example:
Example:
* `kube-apiserver` is at **{{< skew latestVersion >}}**
* `kubectl` is supported at **{{< skew nextMinorVersion >}}**, **{{< skew latestVersion >}}**, and **{{< skew prevMinorVersion >}}**
* `kube-apiserver` is at **{{< skew currentVersion >}}**
* `kubectl` is supported at **{{< skew nextMinorVersion >}}**, **{{< skew currentVersion >}}**, and **{{< skew currentVersionAddMinor -1 >}}**
-->
### kubectl {#kubectl}
@ -189,9 +189,9 @@ Example:
例如:
* `kube-apiserver` 处于 **{{< skew latestVersion >}}** 版本
* `kubectl` 支持 **{{< skew nextMinorVersion >}}**、**{{< skew latestVersion >}}**
**{{< skew prevMinorVersion >}}** 版本
* `kube-apiserver` 处于 **{{< skew currentVersion >}}** 版本
* `kubectl` 支持 **{{< skew nextMinorVersion >}}**、**{{< skew currentVersion >}}**
**{{< skew currentVersionAddMinor -1 >}}** 版本
{{< note >}}
<!--
@ -203,66 +203,66 @@ If version skew exists between `kube-apiserver` instances in an HA cluster, this
<!--
Example:
* `kube-apiserver` instances are at **{{< skew latestVersion >}}** and **{{< skew prevMinorVersion >}}**
* `kubectl` is supported at **{{< skew latestVersion >}}** and **{{< skew prevMinorVersion >}}** (other versions would be more than one minor version skewed from one of the `kube-apiserver` components)
* `kube-apiserver` instances are at **{{< skew currentVersion >}}** and **{{< skew currentVersionAddMinor -1 >}}**
* `kubectl` is supported at **{{< skew currentVersion >}}** and **{{< skew currentVersionAddMinor -1 >}}** (other versions would be more than one minor version skewed from one of the `kube-apiserver` components)
-->
例如:
* `kube-apiserver` 实例处于
**{{< skew latestVersion >}}** 和 **{{< skew prevMinorVersion >}}** 版本
* `kubectl` 支持 **{{< skew latestVersion >}}** 和 **{{< skew prevMinorVersion >}}**
**{{< skew currentVersion >}}** 和 **{{< skew currentVersionAddMinor -1 >}}** 版本
* `kubectl` 支持 **{{< skew currentVersion >}}** 和 **{{< skew currentVersionAddMinor -1 >}}**
版本(其他版本将与 `kube-apiserver` 组件之一相差不止一个的次要版本)
<!--
## Supported component upgrade order
The supported version skew between components has implications on the order in which components must be upgraded.
This section describes the order in which components must be upgraded to transition an existing cluster from version **{{< skew prevMinorVersion >}}** to version **{{< skew latestVersion >}}**.
This section describes the order in which components must be upgraded to transition an existing cluster from version **{{< skew currentVersionAddMinor -1 >}}** to version **{{< skew currentVersion >}}**.
-->
## 支持的组件升级顺序 {#supported-component-upgrade-order}
组件之间支持的版本偏差会影响必须升级组件的顺序。
本节介绍了将现有集群从 **{{< skew prevMinorVersion >}}**
版本转换到 **{{< skew latestVersion >}}** 版本时必须升级组件的顺序。
本节介绍了将现有集群从 **{{< skew currentVersionAddMinor -1 >}}**
版本转换到 **{{< skew currentVersion >}}** 版本时必须升级组件的顺序。
<!--
### kube-apiserver
Pre-requisites:
* In a single-instance cluster, the existing `kube-apiserver` instance is **{{< skew prevMinorVersion >}}**
* In an HA cluster, all `kube-apiserver` instances are at **{{< skew prevMinorVersion >}}** or **{{< skew latestVersion >}}** (this ensures maximum skew of 1 minor version between the oldest and newest `kube-apiserver` instance)
* The `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` instances that communicate with this server are at version **{{< skew prevMinorVersion >}}** (this ensures they are not newer than the existing API server version, and are within 1 minor version of the new API server version)
* `kubelet` instances on all nodes are at version **{{< skew prevMinorVersion >}}** or **{{< skew oldestMinorVersion >}}** (this ensures they are not newer than the existing API server version, and are within 2 minor versions of the new API server version)
* In a single-instance cluster, the existing `kube-apiserver` instance is **{{< skew currentVersionAddMinor -1 >}}**
* In an HA cluster, all `kube-apiserver` instances are at **{{< skew currentVersionAddMinor -1 >}}** or **{{< skew currentVersion >}}** (this ensures maximum skew of 1 minor version between the oldest and newest `kube-apiserver` instance)
* The `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` instances that communicate with this server are at version **{{< skew currentVersionAddMinor -1 >}}** (this ensures they are not newer than the existing API server version, and are within 1 minor version of the new API server version)
* `kubelet` instances on all nodes are at version **{{< skew currentVersionAddMinor -1 >}}** or **{{< skew currentVersionAddMinor -2 >}}** (this ensures they are not newer than the existing API server version, and are within 2 minor versions of the new API server version)
* Registered admission webhooks are able to handle the data the new `kube-apiserver` instance will send them:
* `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` objects are updated to include any new versions of REST resources added in **{{< skew latestVersion >}}** (or use the [`matchPolicy: Equivalent` option](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy) available in v1.15+)
* The webhooks are able to handle any new versions of REST resources that will be sent to them, and any new fields added to existing versions in **{{< skew latestVersion >}}**
* `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` objects are updated to include any new versions of REST resources added in **{{< skew currentVersion >}}** (or use the [`matchPolicy: Equivalent` option](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy) available in v1.15+)
* The webhooks are able to handle any new versions of REST resources that will be sent to them, and any new fields added to existing versions in **{{< skew currentVersion >}}**
-->
### kube-apiserver {#kube-apiserver-1}
先决条件:
* 在单实例集群中,现有的 `kube-apiserver` 实例处于 **{{< skew prevMinorVersion >}}** 版本
* 在单实例集群中,现有的 `kube-apiserver` 实例处于 **{{< skew currentVersionAddMinor -1 >}}** 版本
* 在 HA 集群中,所有 `kube-apiserver` 实例都处于
**{{< skew prevMinorVersion >}}** 或 **{{< skew latestVersion >}}** 版本
**{{< skew currentVersionAddMinor -1 >}}** 或 **{{< skew currentVersion >}}** 版本
(这确保了最老和最新的 `kube-apiserver` 实例之间的 1 个次要版本的最大偏差)
* 与此服务器通信的 `kube-controller-manager`、`kube-scheduler` 和 `cloud-controller-manager`
实例的版本为 **{{< skew prevMinorVersion >}}**
实例的版本为 **{{< skew currentVersionAddMinor -1 >}}**
(这确保它们是不比现有 API 服务器版本还要新,并且在新 API 服务器版本的 1 个次要版本内)
* 所有节点上的 `kubelet` 实例都是
**{{< skew prevMinorVersion >}}** 或 **{{< skew oldMinorVersion >}}**
**{{< skew currentVersionAddMinor -1 >}}** 或 **{{< skew oldMinorVersion >}}**
版本(这确保它们不比现有 API 服务器版本新,并且在新 API 服务器版本的 2 个次要版本内)
* 已注册的 admission webhook 能够处理新的 `kube-apiserver` 实例将发送给他们的数据:
* `ValidatingWebhookConfiguration``MutatingWebhookConfiguration`
对象已更新以包含 **{{< skew latestVersion >}}** 中添加的任何新版本的 REST 资源
对象已更新以包含 **{{< skew currentVersion >}}** 中添加的任何新版本的 REST 资源
(或使用 v1.15+ 中可用的 [`matchPolicy: Equivalent` 选项](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy)
* webhook 能够处理将发送给它们的任何新版本的 REST 资源,
以及添加到 **{{< skew latestVersion >}}** 中现有版本的任何新字段
以及添加到 **{{< skew currentVersion >}}** 中现有版本的任何新字段
<!--
Upgrade `kube-apiserver` to **{{< skew latestVersion >}}**
Upgrade `kube-apiserver` to **{{< skew currentVersion >}}**
-->
`kube-apiserver` 升级到 **{{< skew latestVersion >}}** 版本
`kube-apiserver` 升级到 **{{< skew currentVersion >}}** 版本
{{< note >}}
<!--
@ -280,38 +280,38 @@ require `kube-apiserver` to not skip minor versions when upgrading, even in sing
Pre-requisites:
* The `kube-apiserver` instances these components communicate with are at **{{< skew latestVersion >}}** (in HA clusters in which these control plane components can communicate with any `kube-apiserver` instance in the cluster, all `kube-apiserver` instances must be upgraded before upgrading these components)
* The `kube-apiserver` instances these components communicate with are at **{{< skew currentVersion >}}** (in HA clusters in which these control plane components can communicate with any `kube-apiserver` instance in the cluster, all `kube-apiserver` instances must be upgraded before upgrading these components)
Upgrade `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` to **{{< skew latestVersion >}}**
Upgrade `kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` to **{{< skew currentVersion >}}**
-->
### kube-controller-manager、kube-scheduler 和 cloud-controller-manager {#kube-controller-manager-kube-scheduler-and-cloud-controller-manager-1}
先决条件:
* 与这些组件通信的 `kube-apiserver` 实例处于 **{{< skew latestVersion >}}** 版本
* 与这些组件通信的 `kube-apiserver` 实例处于 **{{< skew currentVersion >}}** 版本
(在 HA 集群中,这些控制平面组件可以与集群中的任何 `kube-apiserver` 实例通信,
所有 `kube-apiserver` 实例必须在升级这些组件之前升级)
`kube-controller-manager`、`kube-scheduler` 和 `cloud-controller-manager`
升级到 **{{< skew latestVersion >}}** 版本
升级到 **{{< skew currentVersion >}}** 版本
<!--
### kubelet
Pre-requisites:
* The `kube-apiserver` instances the `kubelet` communicates with are at **{{< skew latestVersion >}}**
* The `kube-apiserver` instances the `kubelet` communicates with are at **{{< skew currentVersion >}}**
Optionally upgrade `kubelet` instances to **{{< skew latestVersion >}}** (or they can be left at **{{< skew prevMinorVersion >}}** or **{{< skew oldestMinorVersion >}}**)
Optionally upgrade `kubelet` instances to **{{< skew currentVersion >}}** (or they can be left at **{{< skew currentVersionAddMinor -1 >}}** or **{{< skew currentVersionAddMinor -2 >}}**)
-->
### kubelet {#kubelet-1}
先决条件:
* 与 `kubelet` 通信的 `kube-apiserver` 实例处于 **{{< skew latestVersion >}}** 版本
* 与 `kubelet` 通信的 `kube-apiserver` 实例处于 **{{< skew currentVersion >}}** 版本
可选择将 `kubelet` 实例升级到 **{{< skew latestMinorVersion >}}** 版本
(或者它们可以留在 **{{< skew prevMinorVersion >}}** 或 **{{< skew oldMinorVersion >}}** 版本)
(或者它们可以留在 **{{< skew currentVersionAddMinor -1 >}}** 或 **{{< skew oldMinorVersion >}}** 版本)
{{< note >}}
<!--
@ -344,10 +344,10 @@ Running a cluster with `kubelet` instances that are persistently two minor versi
Example:
If `kube-proxy` version is **{{< skew oldestMinorVersion >}}**:
If `kube-proxy` version is **{{< skew currentVersionAddMinor -2 >}}**:
* `kubelet` version must be at the same minor version as **{{< skew oldestMinorVersion >}}**.
* `kube-apiserver` version must be between **{{< skew oldestMinorVersion >}}** and **{{< skew latestVersion >}}**, inclusive.
* `kubelet` version must be at the same minor version as **{{< skew currentVersionAddMinor -2 >}}**.
* `kube-apiserver` version must be between **{{< skew currentVersionAddMinor -2 >}}** and **{{< skew currentVersion >}}**, inclusive.
-->
### kube-proxy {#kube-proxy}
@ -360,4 +360,4 @@ If `kube-proxy` version is **{{< skew oldestMinorVersion >}}**:
如果 `kube-proxy` 版本处于 **{{< skew oldMinorVersion >}}** 版本:
* `kubelet` 必须处于相同的次要版本 **{{< skew oldMinorVersion >}}**。
* `kube-apiserver` 版本必须介于 **{{< skew oldMinorVersion >}}** 和 **{{< skew latestVersion >}}** 之间,包括两者。
* `kube-apiserver` 版本必须介于 **{{< skew oldMinorVersion >}}** 和 **{{< skew currentVersion >}}** 之间,包括两者。