MacOS
This is actually a really quick process so this article is going to be short. This process will show you how to do the following:
- How to Install Brew for MacOS
- How to Install the OpenShift CLI using Brew
- How to Utilize the Login Command with Token to Access a Cluster
Step 1. Install Brew for MacOS
Run the following command to install brew in a terminal window:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Note: After you run the command there are some additional commands that will be asked to run in order to run brew. If this is not run successfully a command not found will display when running the brew command.
Step 2. Install the OpenShift CLI using Brew
Run the following command in the terminal to install the OpenShift (aka OC) CLI utility:
$ brew install openshift-cli
Windows
https://access.redhat.com/downloads/content/290/ver=4.18/rhel—9/4.18.8/x86_64/product-software
Linux
https://access.redhat.com/downloads/content/290/ver=4.18/rhel—9/4.18.8/x86_64/product-software
mkdir /ocp-tools
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.6/openshift-client-linux.tar.gz -P /ocp-tools
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.6/openshift-install-linux.tar.gz -P /ocp-tools
ls -la /ocp-tools
cd /ocp-tools
chmod 777 *
tar xvf openshift-install-linux.tar.gz openshift-install
tar xvf openshift-client-linux.tar.gz oc kubectl
cp oc kubectl /usr/local/bin
oc version
kubectl version
/ocp-tools/openshift-install version
Go to this link to get your desired version of the OC client tool. I have choosen the latest version available in July, 2020.
wget https://github.com/openshift/okd/releases/download/4.5.0-0.okd-2020-07-14-153706-ga/openshift-client-linux-4.5.0-0.okd-2020-07-14-153706-ga.tar.gz
tar -xvf openshift-client-linux-4.5.0-0.okd-2020-07-14-153706-ga.tar.gz
sudo mv oc kubectl /usr/local/bin/
oc version
** You may need to add the installation path in your bash profile
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND