The maximum version skew supported between various Kubernetes components.
-->
<!-- overview -->
<!--
This document describes the maximum version skew supported between various Kubernetes components.
Specific cluster deployment tools may place additional restrictions on version skew.
-->
本文档描述了 Kubernetes 各个组件之间所支持的最大版本偏差。
特定的集群部署工具可能会对版本偏差添加额外的限制。
<!-- body -->
<!--
## Supported versions
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://git.k8s.io/sig-release/release-engineering/versioning.md#kubernetes-release-versioning).
The Kubernetes project maintains release branches for the most recent three minor releases ({{<skewlatestVersion>}}, {{<skewprevMinorVersion>}}, {{<skewoldestMinorVersion>}}). Kubernetes 1.19 and newer receive [approximately 1 year of patch support](/releases/patch-releases/#support-period). Kubernetes 1.18 and older received approximately 9 months of patch support.
In [highly-available (HA) clusters](/docs/setup/production-environment/tools/kubeadm/high-availability/), the newest and oldest `kube-apiserver` instances must be within one minor version.
*`kube-apiserver` instances are at **{{<skewcurrentVersion>}}** and **{{<skewcurrentVersionAddMinor-1>}}**
*`kubelet` is supported at **{{<skewcurrentVersionAddMinor-1>}}**, and **{{<skewcurrentVersionAddMinor-2>}}** (**{{<skewcurrentVersion>}}** is not supported because that would be newer than the `kube-apiserver` instance at version **{{<skewcurrentVersionAddMinor-1>}}**)
### kube-controller-manager, kube-scheduler, and cloud-controller-manager
`kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` must not be newer than the `kube-apiserver` instances they communicate with. They are expected to match the `kube-apiserver` minor version, but may be up to one minor version older (to allow live upgrades).
*`kube-apiserver` is at **{{<skewcurrentVersion>}}**
*`kube-controller-manager`, `kube-scheduler`, and `cloud-controller-manager` are supported at **{{<skewcurrentVersion>}}** and **{{<skewcurrentVersionAddMinor-1>}}**
If version skew exists between `kube-apiserver` instances in an HA cluster, and these components can communicate with any `kube-apiserver` instance in the cluster (for example, via a load balancer), this narrows the allowed versions of these components.
*`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 **{{<skewcurrentVersionAddMinor-1>}}** (**{{<skewcurrentVersion>}}** is not supported because that would be newer than the `kube-apiserver` instance at version **{{<skewcurrentVersionAddMinor-1>}}**)
*`kube-apiserver` instances are at **{{<skewcurrentVersion>}}** and **{{<skewcurrentVersionAddMinor-1>}}**
*`kubectl` is supported at **{{<skewcurrentVersion>}}** and **{{<skewcurrentVersionAddMinor-1>}}** (other versions would be more than one minor version skewed from one of the `kube-apiserver` components)
This section describes the order in which components must be upgraded to transition an existing cluster from version **{{<skewcurrentVersionAddMinor-1>}}** to version **{{<skewcurrentVersion>}}**.
* In a single-instance cluster, the existing `kube-apiserver` instance is **{{<skewcurrentVersionAddMinor-1>}}**
* In an HA cluster, all `kube-apiserver` instances are at **{{<skewcurrentVersionAddMinor-1>}}** or **{{<skewcurrentVersion>}}** (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 **{{<skewcurrentVersionAddMinor-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 **{{<skewcurrentVersionAddMinor-1>}}** or **{{<skewcurrentVersionAddMinor-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)
*`ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` objects are updated to include any new versions of REST resources added in **{{<skewcurrentVersion>}}** (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 **{{<skewcurrentVersion>}}**
* The `kube-apiserver` instances these components communicate with are at **{{<skewcurrentVersion>}}** (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)
Optionally upgrade `kubelet` instances to **{{<skewcurrentVersion>}}** (or they can be left at **{{<skewcurrentVersionAddMinor-1>}}** or **{{<skewcurrentVersionAddMinor-2>}}**)