Oc: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 45: Line 45:
* <span id="describe"></span>[[oc describe]]
* <span id="describe"></span>[[oc describe]]


 
==Create, Update and Delete Resources==


* <span id="create"></span>[[oc create]]
* <span id="create"></span>[[oc create]]
* <span id="edit"></span>[[oc edit]]
* <span id="delete"></span>[[oc delete]]
* <span id="delete"></span>[[oc delete]]
* <span id="new-project"></span>[[oc new-project]]
* <span id="new-app"></span>[[oc new-app]]
==Miscellaneous==
* <span id="deploy"></span>[[oc deploy]]
* <span id="deploy"></span>[[oc deploy]]
* <span id="edit"></span>[[oc edit]]
* <span id="env"></span>[[oc env]]
* <span id="env"></span>[[oc env]]
* <span id="export"></span>[[oc export]]
* <span id="export"></span>[[oc export]]
Line 56: Line 61:
* <span id="logout"></span>[[oc logout]]
* <span id="logout"></span>[[oc logout]]
* <span id="logs"></span>[[oc logs]]
* <span id="logs"></span>[[oc logs]]
* <span id="new-project"></span>[[oc new-project]]
* <span id="new-app"></span>[[oc new-app]]
* <span id="patch"></span>[[oc patch]]
* <span id="patch"></span>[[oc patch]]
* <span id="policy"></span>[[oc policy]]
* <span id="policy"></span>[[oc policy]]

Revision as of 03:10, 6 July 2017

External

Internal

Overview

oc is the OpenShift remote client that talks with the master API server.

Installation

RHEL: oc can be installed with the atomic-openshift-clients package.

Mac: Download from https://access.redhat.com/downloads/content/290, choose "OpenShift v3.5 MacOSX Client". Then extract the content and place "oc" in PATH.

Output

In general, all oc commands can be configured to send their output in either JSON or YAML format, rather than execute the command.

This is achieved with

oc ... -o json|yaml

In case of oc get, the output of the server execution is rendered in JSON/YAML if -o json|yaml is used.

Logging and Debugging

oc ... --loglevel=8

This log level shows the API requests made with each command.

The curl commands used to send the requests are displayed with:

oc --v=10 ...

Commands

Info

Create, Update and Delete Resources

Miscellaneous