Detailed steps on downloading and installing OpenShift CLI on Linux & Windows. You can watch the video or follow the text.
Connect to your RedHat OpenShift Container Platform. Click on the “?” question mark on the top right, and click on “Command Line Tools”

As you can see below, you can download the required versions of oc client from here

Another option is to download it directly from OpenShift mirror repo.
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/


To install on Linux follow these steps below
- Now on your linux machine, download it and set the path.
- curl -O https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.1.0/openshift-client-linux-4.1.0.tar.gz
Untar it


- Now set the path and restart .bashrc
- export PATH=/PathOfTheOCfile:$PATH
- source .bashrc
To install on Windows follow these steps below
On Windows download it to some folder, unzip it

Now add the path to environment variables. In my case, I have copied it to C:/OpenShift/CLI/oc


Let’s check the path is set properly. As you see the path is correct

Now check the oc client version

That’s all, we can now connect to an OpenShift cluster using oc. I will be adding more training on how to use oc client and handy set of useful commands soon.
2 thoughts on “How to install OpenShift CLI (oc) on Linux/Windows”
Comments are closed.