Enhanced OpenShift CLI: Quick Start

Install Enhanced OpenShift CLI

  • gpg: for data encryption and decryption
  • git: for encrypted data storing and sharing
  • gopass: run on top of gpg and git for secret data management
  • oc: the original OpenShift CLI for cluster manipulation
# 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

--

--

--

Life is coding and writing! I am a software engineer who have been in IT field for 10+ years. I would love to write beautiful code and story for people.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Carbon v10.3.0 (May 2019)

Introducing : ARK Docs — Articles, Guides, and Technical Documentation Gathered in One Place

Creating a Laundry Machine IOT Detector with ESP8266 and Ruby on Rails

Best tools for building voice user interfaces

Designing and building voice user interfaces

AWS Multi-Tier Architecture build from scratch (Part 3)

Paradox Realm A Solana Mint

How Does A Wifi Extender Work?

Getting ready to continue the Android journey with Udacity! #androidscholarshipwinner

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
MorningSpace

MorningSpace

Life is coding and writing! I am a software engineer who have been in IT field for 10+ years. I would love to write beautiful code and story for people.

More from Medium

How to use KubeCTL and Lens IDE through Portainer

GUI-Based Openshift Deployments Using Advanced Cluster Management

Deploy Harvester in Proxmox environment: Part5 Harvester v1.0.0

Kubernetes Helm Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress.