Installing the Red Hat OpenShift Container Platform Command line Interface
oc
command, you can create applications and manage Red Hat® OpenShift® Container Platform projects from a
terminal.
For more information about OpenShift CLI see this docProcedure
- Access the Red Hat OpenShift Container Platform Web Console.
- Click Help and select Command Line Tools.
- Click the appropriate link to download the
oc
binary that matches with your Operational System and follow its installation instructions specific to the Operational System of your client machine to be able to runoc
commands from a Terminal.
Results
You can now execute oc
commands directly from a Terminal on your machine.
What to do next
You can access your Red Hat OpenShift cluster by using the oc
command directly from a
Terminal in the client machine oc
was installed to. In order to do that, first you
go in the Red Hat OpenShift web console
, then click your Login name and select
Copy login command. Then, click View token. Copy the
entire command line under the Log in with this token section, paste in the
Terminal of the client machine where oc
was installed to and run the command. You
should see a message saying that you can access a number of projects and a default project selected.
From now on, next time you run oc
commands in this opened Terminal in the client
machine, it will be running the oc
commands in your Red Hat OpenShift cluster.