2.1.2. macOS
Installation for macOS
The straight-forward way to installing oc on your system is to install by downloading the binary.
This is what we are going to do step by step.
Note
With Homebrew, use brew install openshift-cli.
First, download
oc. The following URL directly points to the latest stableocversion:https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-mac.tar.gz
Change into the directory in which you downloaded the file. Unpack the archive, e.g. with:
tar xvzf openshift-client-mac.tar.gzPlace the
ocbinary in a directory that is on yourPATH.
Note
To check your PATH, execute the following command:
echo $PATH
If you have previously accessed a Kubernetes cluster you have to rename your
.kubedirectory.Check if you have a directory
~\.kubeand rename it to something like~\.kube_backup. You can undo this after the training.Now, head over to the 2.2. Console login page.