= Accessing the {openshift} cluster with the {openshift} CLI

Access the {ocp} cluster managed by {prod} by using the {openshift} CLI ([command]`oc`).

.Prerequisites
* {prod} is configured to use the {openshift} preset.
For more information, see link:{crc-gsg-url}#changing-the-selected-preset_gsg[Changing the selected preset].
* A running {prod} instance.
For more information, see link:{crc-gsg-url}#starting-the-instance_gsg[Starting the instance].

.Procedure
. Run the [command]`{bin} oc-env` command to print the command needed to add the cached [command]`oc` executable to your `$PATH`:
+
[subs="+quotes,attributes"]
----
$ {bin} oc-env
----

. Run the printed command.

. Log in as the `developer` user:
+
[subs="+quotes,attributes"]
----
$ oc login -u developer https://api.crc.testing:6443
----
+
[NOTE]
====
The [command]`{bin} start` command prints the password for the `developer` user.
You can also view it by running the [command]`{bin} console --credentials` command.
====

. You can now use [command]`oc` to interact with your {ocp} cluster.
For example, to verify that the {ocp} cluster Operators are available, log in as the `kubeadmin` user and run the following command:
+
[subs="+quotes,attributes",options="nowrap"]
----
$ oc config use-context crc-admin
$ oc whoami
kubeadmin
$ oc get co
----
+
[NOTE]
====
{prod} disables the Cluster Monitoring Operator by default.
====

See link:{crc-gsg-url}#troubleshooting_gsg[Troubleshooting {prod}] if you cannot access the {ocp} cluster managed by {prod}.

.Additional resources
* The link:https://docs.openshift.com/container-platform/latest/applications/projects/working-with-projects.html[{ocp} documentation] covers the creation of projects and applications.
