Bartosz Bierkowski - Low dose cloud

OpenShift CLI morsels: getting docs from oc client

The documentation is not the only place with information about OpenShift CLI. The tool itself contains a huge amount of data about the managed resources itself.

Finding the managed resources

A good starting point is to read output of oc types that returns description of used concept and types. These are not all of them, but the ones used during development. You will not find there details about hostsubnets or users .

For the listed types you can run oc get <type>

Exploring type’s details

Armed with the knowledge of various types, further details can be displayed for it with oc explain <type> . The command prints our all the fields, their types and descriptions.

You can investigate further the fields structure with simple queries:



One of the resources I find very useful during work with OpenShift is Kubernetes page. The kubectl documentation there is very useful to learn also about oc:

The OpenShift Origin docs about CLI:


The commands were executed using minishift and the following client/server versions of OpenShift.

oc v1.5.0-alpha.2+e4b43ee
client kubernetes v1.5.2+43a9be4
openshift v1.3.1
server kubernetes v1.3.0+52492b4


Thanks for reading the OpenShift morsels. To get updates about new articles, you can sign up to the newsletter below.

As a thank you message, you will also get access to OpenShift CLI CheatSheet listing most commonly used commands together with a short explanation.

Did you like the article?
Join the newsletter to receive notifications about new articles.
I respect your privacy.