27.3. Getting cluster version, status, and update details
You can view the cluster version and status by running the oc get clusterversion
command. If the status shows that the installation is still progressing, you can review the status of the Operators for more information.
You can also list the current update channel and review the available cluster updates.
Conditions préalables
-
Vous avez accès au cluster en tant qu'utilisateur ayant le rôle
cluster-admin
. -
Vous avez installé l'OpenShift CLI (
oc
).
Procédure
Obtain the cluster version and overall status:
oc get clusterversion
$ oc get clusterversion
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Exemple de sortie
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.6.4 True False 6m25s Cluster version is 4.6.4
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.6.4 True False 6m25s Cluster version is 4.6.4
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The example output indicates that the cluster has been installed successfully.
If the cluster status indicates that the installation is still progressing, you can obtain more detailed progress information by checking the status of the Operators:
oc get clusteroperators.config.openshift.io
$ oc get clusteroperators.config.openshift.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View a detailed summary of cluster specifications, update availability, and update history:
oc describe clusterversion
$ oc describe clusterversion
Copy to Clipboard Copied! Toggle word wrap Toggle overflow List the current update channel:
oc get clusterversion -o jsonpath='{.items[0].spec}{"\n"}'
$ oc get clusterversion -o jsonpath='{.items[0].spec}{"\n"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Exemple de sortie
{"channel":"stable-4.6","clusterID":"245539c1-72a3-41aa-9cec-72ed8cf25c5c"}
{"channel":"stable-4.6","clusterID":"245539c1-72a3-41aa-9cec-72ed8cf25c5c"}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Review the available cluster updates:
oc adm upgrade
$ oc adm upgrade
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Exemple de sortie
Copy to Clipboard Copied! Toggle word wrap Toggle overflow