Enhanced OpenShift CLI: Quick Start

Install Enhanced OpenShift CLI

# MacOS
$ brew install gnupg2 git
# RHEL & CentOS
$ brew install gnupg2 git
# Ubuntu & Debian
$ apt-get install gnupg2 git
$ curl -OL https://raw.githubusercontent.com/morningspace/oc/master/oc.sh
[[ -f /path/to/oc.sh ]] && source /path/to/oc.sh

Setup Environment

$ gpg --full-generate-key
export GPG_TTY=$(tty)
$ gopass init

Login cluster for the first time

$ oc login
$ oc login
Server [https://localhost:8443]: https://api.cluster-foo.example.com:6443
Username [kubeadmin]:
Password:
Context alias [api-cluster-foo-example-com-6443]: cluster-foo
Login successful.
You have access to 59 projects, the list has been suppressed. You can list all projects with 'oc projects'Using project "default".
Save context 'cluster-foo' into secret store...
Context saved successfully.

Login cluster using context alias

$ oc login -c cluster-foo
Read context 'cluster-foo' from secret store...
Context loaded successfully.
Login successful.
You have access to 59 projects, the list has been suppressed. You can list all projects with 'oc projects'Using project "default".

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store