Kubernetes Upgrades Are A Pain: How Devtron Can Help

Learn how to manage upgrades seamlessly and simplify Kubernetes Manifests for a smoother deployment experience with Devtron.

10 days ago   •   3 min read

By Michael Levan
Table of contents


Kubernetes Upgrades are typically never a fun process. With cloud providers, they’re definitely easier than when just running Kubernetes clusters on-prem, but it still requires everything from backups to scaling to ensuring that applications perform as expected while the upgrade process occurs.

In this blog post, you’ll learn about what Kubernetes upgrades consist of, how to perform an upgrade, and what Devtron can do to help on the Kubernetes Manifest front.

What Do Kubernetes Upgrades Consist Of

A Kubernetes cluster upgrade is a process that involves updating the Kubernetes control plane and node components to a newer version. This includes upgrading the API server, controller manager, scheduler (control plane components), kubelet, and kubectl (node components) to the latest stable release. The upgrade process is crucial to ensure that your cluster is running the most recent and secure version of Kubernetes, which often includes important bug fixes, security patches, and new features.

The way you upgrade a cluster depends on how you initially deployed it and any subsequent changes. At a high level, the steps you perform are: Upgrade the control plane, upgrade the nodes in your cluster, and upgrade clients. It’s important to note that upgrading a cluster should be done carefully and systematically, as it can potentially disrupt running applications and services.

When you’re upgrading cloud providers, the process is pretty similar but can vary.

For example, to upgrade a cluster, GKE updates the version the control plane and nodes are running. Clusters are upgraded to either a newer minor version (for example, 1.24 to 1.25) or newer patch version (for example, 1.24.2-gke.100 to 1.24.5-gke.200). It’s also worth noting that while upgrades are necessary for maintaining the health and security of your cluster, they should be planned and executed during maintenance windows to minimize the impact on running applications.

How To Perform A Kubernetes Upgrade

Upgrading a Kubernetes cluster is a multi-step process that involves updating various components to a newer version. The process begins with planning the upgrade, which includes checking the current version of your cluster and deciding on the target version. It’s crucial to understand the changes that the new version brings, including any deprecated APIs or altered manifest configurations.

The next step is to upgrade the control plane, which includes components like the API server, controller manager, and scheduler. This is typically done using tools like kubeadm, which provide commands to plan and apply the upgrade. During this stage, it’s important to ensure that all control plane components are upgraded to the target version.

Following the control plane upgrade, the next step is to upgrade the worker nodes. This involves draining the nodes to ensure that there are no running workloads, upgrading the kubelet and kubectl components, and then uncordoning the nodes to bring them back into the cluster. It’s important to upgrade one node at a time to maintain the availability of your applications.

Finally, after the control plane and nodes have been upgraded, the last step is to update any client applications that interact with the Kubernetes API. This ensures that they are compatible with the new version of the cluster. It’s also a good practice to validate the successful completion of the upgrade by checking the version of the cluster and the status of the nodes and pods.

How Devtron Can Help

While Devtron doesn’t inherently offer a feature for cluster upgrades, it significantly aids in the process. With each new Kubernetes release, there can be API deprecations and alterations in manifest configurations, such as the removal or introduction of parameters. If you’re managing your Kubernetes manifest manually, these changes can make upgrades a challenging task, as you’ll need to update all your manifests based on the changes in the target Kubernetes version.

As upgrades begin to deprecate resources, having a tool that can help with this is crucial. For example, when Pod Security Policies (PSP) were being deprecated, a lot of engineers were scrambling to ensure that there environment was up to date, running as expected, and wouldn’t go down.

However, Devtron’s Deployment Template eliminates this hassle. It manages both backward and forward compatibility, so you don’t have to worry about making these updates yourself. All you need to do is utilize the Deployment Template and ensure you’re using its latest version. With this approach, all your resources will be prepared for migration to the new cluster you’re upgrading to. This makes Devtron a valuable tool in managing Kubernetes deployments during upgrades.

In short, Devtron doesn’t do anything for the upgrade portion of the cluster as the cluster needs to exist prior to Devtron knowing about it. Devtron doesn’t provide Infrastructure-as-Code to create a cluster or anything like that. It does, however, help ensure that your Kubernetes manifests are properly updated.

If you have any queries, don't hesitate to connect with us. Join the lively discussions and shared knowledge in our actively growing Discord Community.

Spread the word

Keep reading