Installing the Client
Install the OpenShift Command Line Interface (CLI): oc to access the DSRI from your terminal.
The oc CLI allows you to:
- Copy large files to or from the DSRI using
oc cp - Connect to an application terminal using
oc rsh - List the applications running in your project with
oc get pods
Install the oc client
On Linux
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz && tar xvf openshift-client-linux.tar.gz
sudo mv oc kubectl /usr/local/bin/
On Mac
Using brew:
brew install openshift-cli
Or manually:
- Download openshift-client-mac.tar.gz
- Unzip the archive.
- Move the
ocbinary to a directory on your PATH. To check your PATH:
echo $PATH
On Windows
- Create a folder:
C:\Program Files (x86)\OpenShift - Download openshift-client-windows.zip and move it to that folder.
- Extract the
.zipfile. - Add the folder to your system PATH:
- Open Control Panel > System > Advanced system settings.
- Click Environment Variables.
- Find Path in the User or System variables and add
C:\Program Files (x86)\OpenShift.
- Verify the installation by opening PowerShell and running:
oc version
info
See the official OKD documentation if you run into issues installing the client.
Log in with oc
danger
Authentication using your UM password is not supported. You must use a token.
oc login --token=<token>
To get your token:
- Go to the DSRI web UI.
- Click your username in the top right corner and select Copy login command.
- Paste the command in your terminal and run it.
The command will look like this:
oc login https://api.dsri.unimaas.nl:6443 --token=$GENERATED_TOKEN