9.0 KiB
| reviewers | title | content_type | weight | ||||||
|---|---|---|---|---|---|---|---|---|---|
|
Kubernetes version and version skew support policy | concept | 30 |
This document describes the maximum version skew supported between various Kubernetes components. Specific cluster deployment tools may place additional restrictions on version skew.
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 terminology. For more information, see 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.
Applicable fixes, including security fixes, may be backported to those three release branches, depending on severity and feasibility. Patch releases are cut from those branches at a regular cadence, plus additional urgent releases, when required.
The Release Managers group owns this decision.
For more information, see the Kubernetes patch releases page.
Supported version skew
kube-apiserver
In highly-available (HA) clusters, the newest and oldest kube-apiserver instances must be within one minor version.
Example:
- newest
kube-apiserveris at {{< skew latestVersion >}} - other
kube-apiserverinstances are supported at {{< skew latestVersion >}} and {{< skew prevMinorVersion >}}
kubelet
kubelet must not be newer than kube-apiserver, and may be up to two minor versions older.
Example:
kube-apiserveris at {{< skew latestVersion >}}kubeletis supported at {{< skew latestVersion >}}, {{< skew prevMinorVersion >}}, and {{< skew oldestMinorVersion >}}
{{< note >}}
If version skew exists between kube-apiserver instances in an HA cluster, this narrows the allowed kubelet versions.
{{</ note >}}
Example:
kube-apiserverinstances are at {{< skew latestVersion >}} and {{< skew prevMinorVersion >}}kubeletis supported at {{< skew prevMinorVersion >}}, and {{< skew oldestMinorVersion >}} ({{< skew latestVersion >}} is not supported because that would be newer than thekube-apiserverinstance at version {{< skew prevMinorVersion >}})
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).
Example:
kube-apiserveris at {{< skew latestVersion >}}kube-controller-manager,kube-scheduler, andcloud-controller-managerare supported at {{< skew latestVersion >}} and {{< skew prevMinorVersion >}}
{{< note >}}
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.
{{< /note >}}
Example:
kube-apiserverinstances are at {{< skew latestVersion >}} and {{< skew prevMinorVersion >}}kube-controller-manager,kube-scheduler, andcloud-controller-managercommunicate with a load balancer that can route to anykube-apiserverinstancekube-controller-manager,kube-scheduler, andcloud-controller-managerare supported at {{< skew prevMinorVersion >}} ({{< skew latestVersion >}} is not supported because that would be newer than thekube-apiserverinstance at version {{< skew prevMinorVersion >}})
kubectl
kubectl is supported within one minor version (older or newer) of kube-apiserver.
Example:
kube-apiserveris at {{< skew latestVersion >}}kubectlis supported at {{< skew nextMinorVersion >}}, {{< skew latestVersion >}}, and {{< skew prevMinorVersion >}}
{{< note >}}
If version skew exists between kube-apiserver instances in an HA cluster, this narrows the supported kubectl versions.
{{< /note >}}
Example:
kube-apiserverinstances are at {{< skew latestVersion >}} and {{< skew prevMinorVersion >}}kubectlis supported at {{< skew latestVersion >}} and {{< skew prevMinorVersion >}} (other versions would be more than one minor version skewed from one of thekube-apiservercomponents)
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 >}}.
kube-apiserver
Pre-requisites:
- In a single-instance cluster, the existing
kube-apiserverinstance is {{< skew prevMinorVersion >}} - In an HA cluster, all
kube-apiserverinstances are at {{< skew prevMinorVersion >}} or {{< skew latestVersion >}} (this ensures maximum skew of 1 minor version between the oldest and newestkube-apiserverinstance) - The
kube-controller-manager,kube-scheduler, andcloud-controller-managerinstances 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) kubeletinstances 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)- Registered admission webhooks are able to handle the data the new
kube-apiserverinstance will send them:ValidatingWebhookConfigurationandMutatingWebhookConfigurationobjects are updated to include any new versions of REST resources added in {{< skew latestVersion >}} (or use thematchPolicy: Equivalentoption 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 >}}
Upgrade kube-apiserver to {{< skew latestVersion >}}
{{< note >}}
Project policies for API deprecation and
API change guidelines
require kube-apiserver to not skip minor versions when upgrading, even in single-instance clusters.
{{< /note >}}
kube-controller-manager, kube-scheduler, and cloud-controller-manager
Pre-requisites:
- The
kube-apiserverinstances these components communicate with are at {{< skew latestVersion >}} (in HA clusters in which these control plane components can communicate with anykube-apiserverinstance in the cluster, allkube-apiserverinstances must be upgraded before upgrading these components)
Upgrade kube-controller-manager, kube-scheduler, and cloud-controller-manager to {{< skew latestVersion >}}
kubelet
Pre-requisites:
- The
kube-apiserverinstances thekubeletcommunicates with are at {{< skew latestVersion >}}
Optionally upgrade kubelet instances to {{< skew latestVersion >}} (or they can be left at {{< skew prevMinorVersion >}} or {{< skew oldestMinorVersion >}})
{{< warning >}}
Running a cluster with kubelet instances that are persistently two minor versions behind kube-apiserver is not recommended:
- they must be upgraded within one minor version of
kube-apiserverbefore the control plane can be upgraded - it increases the likelihood of running
kubeletversions older than the three maintained minor releases {{</ warning >}}
kube-proxy
kube-proxymust be the same minor version askubeleton the node.kube-proxymust not be newer thankube-apiserver.kube-proxymust be at most two minor versions older thankube-apiserver.
Example:
If kube-proxy version is {{< skew latestVersion >}}:
kubeletversion must be at the same minor version as {{< skew latestVersion >}}.kube-apiserverversion must be between {{ skew oldestMinorVersion }} and {{ skew latestVersion }}, inclusive.