Reviewing the Cluster Version Resource

To log in to the cluster, start by exporting the KUBECONFIG variable, whose value points to the auth/kubeconfig file in the installation directory. The oc command uses this environment variable to locate the API endpoint of the cluster.

export KUBECONFIG=/root/okd-config/auth/kubeconfig

Run oc login to connect to the cluster with a user name of kubeadmin. The password of the kubeadmin user is in the kubeadmin-password file in the same auth directory.

cat okd-config/auth/kubeadmin-password 
oc login -u kubeadmin -p JP2ph-6q7J5-aF5xJ-8b2XK

ClusterVersion is a custom resource that holds high-level information about the cluster, such as the update channels, the status of the cluster operators, and the cluster version (for example 4.2.2). Use this resource to declare the version of the cluster you wish to run. Defining a new version for the cluster instructs the cluster-version operator to upgrade the cluster to that version.

You can retrieve the cluster version to verify that it is running the desired version, but also to ensure that the cluster uses the right subscription channel.

  • Run oc get clusterversion to retrieve the cluster version. The output lists the version, including minor releases, the cluster uptime for a given version, and the overall status of the cluster.
oc get clusterversion

  • Run oc describe clusterversion to obtain more detailed information about the cluster status.
oc describe clusterversion