Kubernetes stayed on OLD Version How to upgrade

Yeasin 0 Reputation points
2023-07-20T07:08:24.42+00:00

Due to Some managerial conflicts one of our cluster stayed in Kubernetes version 1.21 for a long time.

Now after the issue has been resolved we need to upgrade to version 1.25

However in the web UI we don't see higher versions 1.22, 1.23

Generally it is not advisable and possible to upgrade Kubernetes more than one versions at a time.

So currently we are confused regarding the upgrade path and methodology for this cluster.

If we upgrade to 1.24 will it succeed? considering we don't have any deprecated api resources.

What are some alternative?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,269 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Marian Leica 536 Reputation points Microsoft Employee
    2023-07-20T08:30:08.7566667+00:00

    Hi @Yeasin,

    Indeed, when you upgrade a supported AKS cluster, minor versions can't be skipped. For example, upgrades 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, while 1.14.x -> 1.16.x is not allowed.

    (!) However, skipping multiple versions can be done when upgrading from an unsupported version back to a supported version. This is your case as well since 1.21 is an unsupported version, so you can upgrade directly to any of the currently supported Kubernetes versions from the list.

    To check the currently supported Kubernetes versions for your AKS cluster and region by running:
    az aks get-versions -l <region>

    What you need to be careful of is that many things have changed between 1.21 and 1.25 and there might be inconsistencies in your cluster configuration or application configuration so you check in advance if your application works fine on 1.25.

    Version 1.25 also runs Ubuntu 22.04 by default, while earlier versions are with 18.04

    You can also test everything in a new cluster with 1.25 on which to deploy your applications and configurations if you want to keep the old cluster for your workloads and just upgrade the version.

    Hope this helps! Please be sure to accept the answer if this was helpful and let us know in the comments if there are any follow-up questions.

    0 comments No comments

  2. Prrudram-MSFT 27,786 Reputation points
    2023-07-21T16:05:15.3433333+00:00

    Hi @Yeasin

    In support to Marian's answer, I am adding my response for your help.

    If you do not have any deprecated API resources, upgrading to version 1.24 should succeed. However, it is always recommended to test the upgrade in a non-production environment before upgrading your production cluster.

    If you are unable to upgrade to version 1.24 or higher, you can consider creating a new AKS cluster with the desired version of Kubernetes and migrating your workloads to the new cluster. This will require some downtime, but it will ensure that you are running a supported version of Kubernetes.

    Before upgrading or creating a new cluster, it is recommended to review the release notes for each version of Kubernetes to understand any changes or deprecations that may affect your workloads.

    Hope this helps!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.