Red Hat OpenShift – Updating a cluster using the Web Console and CLI

One of the challenges that organizations and administrators need to be familiar is installing patches/updating the Red Hat OpenShift infrastructure. There are two ways to update a cluster: using Web Console or CLI. With both methods, you can achieve the same result.

In this article, I will show how to update a Red Hat OpenShfit cluster using the Web Console and CLI from version 4.16.10 to 4.16.15
Remember to always read release notes and check every compatibility.

Prerequisites

  • This is SNO (single node) cluster. You don’t need to to pause the MachineHealthCheck resources. Is not required because there is no other node to perform the health check. If you’re running non-SNO cluster, pause MachineHealthCheck using this docs or this
  • Create etcd backup. Look at my post. But, restore etcd in SNO cluster are not officially supported. But, it’s a good practice to have some backup. Especially, in the non-SNO, production environment.
  • SNO cluster will be rebooted and some downtime will appear.
  • Create Container Storage Interface (CSI) volume snapshot
  • Update all Operators previously installed through Operator Lifecycle Manager (OLM) to a version that is compatible with your target release.

1. Updating a cluster using the Web Console

In this tutorial, I’m going to use my RH OpenShift SNO cluster.

1. Log in to the Red Hat OpenShift Web Console. If you click “Update Cluster” from the Home screen/Overview you will be redirected to the place, where you can upgrade cluster.
The same result will be, when you go to the Administration->Cluster Settings.

2. Here are listed a some details about current cluster.
Click Select a version to list available versions to update.

3. From drop-down menu – Select new version, choose version to update. In this case, I want to go with 4.16.12. Choose full cluster update and hit Update button.

4. Update in progress. More details are visible after click View conditions.

5. During the update this SNO cluster, there are only visible two progress bars: ClusterOperators and and Control plane Nodes 0/1. If you have non-SNO cluster with 3 control planes and 3 workers, progress bar will look similar like on the right picture.

6. Upgrade completed! Cluster is running on the desired version 4.16.12 ! 😉

2. Updating a cluster using the CLI

Another method to update your cluster is to use the CLI. The following steps are a continuation of updating after using the Web Console method.

1. Log in to the cluster using “oc” command and check a current version, channel (stable, candidate, eus or fast) and recommended updates.

ac adm upgrade

2. To update to the specific version type a command:

oc adm upgrade --to=4.16.15

If you want to update to the latest available version type a command:

oc adm upgrade --to-latest=true

3. Update in progress. To watch the status, you can use watch command or go to the Web Console and look into the Cluster Settings section (Administration->Cluster Settings)

watch oc adm upgrade

4. Upgrade completed! Cluster is running on the newest version 4.16.15! 😉

Summary

Red Hat OpenShift cluster was updated to the newest available build using both methods. You can use any of this options.

If you want to learn more about the update process in RH OpenShift, please refer to the official documentation

Keep looking at my blog, new posts are coming! There is so much more great features to explore 😉

Leave a Reply

Your email address will not be published. Required fields are marked *