How to upgrade the OpenShift 4.x cluster

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform
    • 4.x

Issue

  • How to upgrade the Openshift 4 cluster

Resolution

  • One can upgrade the cluster using either CLI or GUI.
    1. To upgrade the cluster using CLI:
$ oc adm upgrade --to=4.0.0-0.11
  • Replace 4.0.0-0.11 with the appropriate version.
  • For example:
  • To upgrade the cluster using CLI:
[user@host beta3]$ oc get clusterversion
NAME      VERSION      AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.0.0-0.10   True        False         111m    Cluster version is 4.0.0-0.10

[user@host beta3]$ oc adm upgrade 
Cluster version is 4.0.0-0.10
Updates:
VERSION    IMAGE
4.0.0-0.11 quay.io/openshift-release-dev/ocp-release:4.0.0-0.11

[user@host beta3]$ oc adm upgrade --to=4.0.0-0.11
Updating to 4.0.0-0.11

[user@host beta3]$ oc get clusterversion
NAME      VERSION      AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.0.0-0.11   True        True          32s     Working towards 4.0.0-0.11: 15% complete

2. To upgrade the cluster using GUI:

  • From the web console, click Administration > Cluster Settings and review the contents of the Overview tab.
  • For production clusters, ensure that the CHANNEL is set to stable-4.0.
    • If the UPDATE STATUS is not Updates Available, one cannot upgrade your cluster.
    • The DESIRED VERSION indicates the cluster version that the cluster is running or is updating to.
    • Click Updates Available, select a version to update to, and click Update.
  • The UPDATE STATUS changes to Updating, and one can review the progress of the Operator upgrades on the Cluster Operators tab.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.