Login to the infra node (or Boot node as the case may be) and check if the oc tool is installed. If the oc tool is not installed, follow the steps below:
In the OCP console, click on ‘Command line tools’
Click on ‘Download oc’
After downloading the file ‘oc.tar.gz’, extract it using the command below, give the appropriate permission and move to /usr/bin directory
tar xzvf oc.tar.gz
chmod 755 oc
mv oc /usr/bin
oc login --server=<OCP api server> -u <ocp admin user> -p <password>
You may also login by getting the login command with a generated token. To get the login command, login to the OCP console and click on ‘Copy login command’
Click on ‘Display Token’
Copy the login command with token
Login to OCP using this login command
By default, the OpenShift Container Platform registry is secured during cluster installation so that it serves traffic through TLS. Unlike previous versions of the OpenShift Container Platform, the registry is not exposed outside of the cluster at the time of installation.
Instead of logging in to the OpenShift Container Platform registry from within the cluster, you can gain external access to it by exposing it with a route. This allows you to log in to the registry from outside the cluster using the route address, and to tag and push images using the route host.
Run the command below in a single line to expose the OCP registry:
oc patch configs.imageregistry.operator.openshift.io/cluster
--patch '{"spec":{"defaultRoute":true}}' --type=merge
oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}'
Use the command below to check if File and Block storage classes are available to use:
oc get sc
Run the command below to verify that all OCP nodes are in ‘Ready’ state
oc get nodes