Kubernetes 1.22 Upgrade guide

The Kubernetes 1.22 release removes a lot of deprecated resource versions.
This guide is intended to help you safely upgrade your cluster a supported Kubernetes version that MetaKube offers.

What does it mean?

Kubernetes commonly deprecates resource versions. Deprecated versions are "marked" for removal for a future version.
Kubernetes hasn't removed resource versions since 1.16, so 1.22 is a special release in this regard.

All the versions that are being removed, have respective stable "v1" versions.
So all objects of the resources have already been translated and stored by Kubernetes in their "preferred" version "v1".

However, the Kubernetes API will no longer accept operations on resources with versions that were removed.
This means, that clients that use these versions, will fail with errors.
The most common clients are:

  • kubectl or helm using Kubernetes manifests
  • Custom Kubernetes operators

Most open source software for Kubernetes have released newer versions that are no longer using deprecated versions.

How do I ensure that my applications will work after the upgrade?

Am I using deprecated versions?

Kubernetes won't store objects in their deprecated versions, so listing e.g. all Ingress objects, will show only v1 resources.
To find out if you're using deprecated versions:

  • Search the manifests that you deploy for deprecated versions.
  • If you're using Helm charts, use the helm template command to print the manifests that Helm installs.
  • Check README files of charts for information on what Kubernetes versions each chart version supports.
  • Before upgrading your production cluster, try your "dev" cluster first, deploy your applications and check for errors in their logs.

What do I need to change?

Some resources use a modified schema, so you might have to change some fields.
The Official Deprecation Guide has detailed information on each resource.