Oc edit: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
=Overview=
=Overview=


In-line metadata editing with vi. Exposes the metadata in YAML format for editing.
In-line metadata editing with vi. Exposes the metadata in YAML or JSON format for editing.
 
Changes are persisted immediately, and then OpenShift attempts to run [[Oc update#Overview|oc update]] using the configuration file.
 
{{Warn|If an error occurs during the update process, the configuration is reverted to the original state. The modified configuration is saved in a temporary folder. The folder can be accessed and the update can be run again.}}


=Generic Syntax=
=Generic Syntax=
Line 11: Line 15:
oc edit supports the following generic syntax:
oc edit supports the following generic syntax:


  oc edit ''<[[OpenShift Component Types#Overview|componentType]]>''/''<componentName>''
  oc edit ''<[[OpenShift_Concepts#Objects|componentType]]>''/''<componentName>'' [-o json]
 
The default format is YAML.


  oc edit daemonset/logging-fluentd
  oc edit daemonset/logging-fluentd
Line 20: Line 26:
The same pattern applies for [[oc describe#Generic_Syntax|oc describe]].
The same pattern applies for [[oc describe#Generic_Syntax|oc describe]].


For a complete list of OpenShift component types, see {{Internal|OpenShift Component Types|OpenShift Component Types}}
For a complete list of OpenShift component types, see {{Internal|OpenShift_Concepts#Objects|OpenShift Objects}}


=Sub-Commands=
=Sub-Commands=


  oc edit project ''<project-name>''
  oc edit project ''<project-name>''

Latest revision as of 20:26, 31 January 2018

Internal

Overview

In-line metadata editing with vi. Exposes the metadata in YAML or JSON format for editing.

Changes are persisted immediately, and then OpenShift attempts to run oc update using the configuration file.


If an error occurs during the update process, the configuration is reverted to the original state. The modified configuration is saved in a temporary folder. The folder can be accessed and the update can be run again.

Generic Syntax

oc edit supports the following generic syntax:

oc edit <componentType>/<componentName> [-o json]

The default format is YAML.

oc edit daemonset/logging-fluentd
oc edit node/node1
oc edit pod/logging-fluentd-3kz30
oc edit oauthclient/kibana-proxy

The same pattern applies for oc describe.

For a complete list of OpenShift component types, see

OpenShift Objects

Sub-Commands

oc edit project <project-name>