:_mod-docs-content-type: PROCEDURE
[id="oc-adm-upgrade-recommend_{context}"]
= Using the oc adm upgrade recommend command to identify update risks

[role="_abstract"]
To identify potential update risks before initiating a cluster update, you can use the `oc adm upgrade recommend` command.

When you run the `oc adm upgrade recommend` command, the output displays the following information:

* Any issues that cause the Cluster Version Operator to have a status of `Failing=True`
* Any firing alerts that might be a cause for concern about a cluster update
* Information about your current update channel and your cluster's update service
* Recommended target versions and any relevant known issues associated with each version

You can use the information provided by the output to make informed decisions about the state of your cluster. Examples include whether any critical cluster issues should be addressed before attempting an update, or which specific target version would have less risk for your cluster.

[NOTE]
====
The `oc adm upgrade recommend` command is read-only and does not affect the state of the cluster. To request an update, use the `oc adm upgrade` command.
====

.Prerequisites

* You installed the latest version of {oc-first}.
* You are logged in with a token-based identity, such as `kubeadmin`, by using the `oc login` command.
+
[NOTE]
====
The `oc adm upgrade recommend` command requires a bearer token to query the cluster's Thanos monitoring service for firing alerts. Certificate-based authentication, such as the `system:admin` identity provided in the default `kubeconfig` file from the installation program, does not satisfy this requirement. If you use certificate-based authentication, the command output displays the following message and skips all alert-based precondition checks:

[source,terminal]
----
Failed to check for at least some preconditions: no token is currently in use for this session
----
====

.Procedure

* Identify potential update risks and view recommended update versions by running the following command:
+
[source,terminal]
----
$ oc adm upgrade recommend
----
+
.Example output
[source,terminal]
----
The following conditions found no cause for concern in updating this cluster to later releases: recommended/CriticalAlerts (AsExpected), recommended/NodeAlerts (AsExpected), recommended/PodDisruptionBudgetAlerts (AsExpected), recommended/PodImagePullAlerts (AsExpected), recommended/UpdatePrecheckAlerts (AsExpected)

Upstream update service is unset, so the cluster will use an appropriate default.
Channel: stable-4.21 (available channels: candidate-4.20, candidate-4.21, candidate-4.22, eus-4.20, fast-4.20, fast-4.21, stable-4.20, stable-4.21)

Updates to 4.21:
  VERSION     ISSUES
  4.21.14     no known issues relevant to this cluster
  4.21.13     no known issues relevant to this cluster
And 2 older 4.21 updates you can see with '--show-outdated-releases' or '--version VERSION'.

Updates to 4.20:
  VERSION     ISSUES
  4.20.20     no known issues relevant to this cluster
----