Oc new-app: Difference between revisions
Jump to navigation
Jump to search
(8 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
* [[Oc#new-app|oc]] | * [[Oc#new-app|oc]] | ||
* [[oc new-project]] | * [[oc new-project]] | ||
* [[oc run]] | |||
=Overview= | =Overview= | ||
Line 9: | Line 10: | ||
For more details see: {{Internal|OpenShift Application Operations#Overview|Application Operations}} | For more details see: {{Internal|OpenShift Application Operations#Overview|Application Operations}} | ||
=Modes= | |||
* [[OpenShift Create an Application from a Git Repository|Create an Application from a Git Repository]] | |||
* [[OpenShift Create an Application from a Template|Create an Application from a Template]] | |||
* [[OpenShift Create an Application from a Docker Image|Create an Application from a Docker Image]] | |||
=Dry Run= | |||
Specify | |||
-o yaml|json | |||
and no objects will be created, but only YAML|JSON output generated. | |||
=Options= | =Options= | ||
Line 23: | Line 37: | ||
{{Warn|Do not use spaces within the -l '...'}} | {{Warn|Do not use spaces within the -l '...'}} | ||
Note that using "app=..." label will overwrite the default app label value set by the new-app command. The command line value takes precedence. | |||
==-p, --param== | |||
Set values for template parameters: | |||
oc new-app -p "VOLUME_CAPACITY=2Gi" | |||
oc new-app --param "VOLUME_CAPACITY=2Gi" | |||
==--name=== | |||
--name=something | |||
The name of the generated application artifacts. |
Latest revision as of 23:11, 5 February 2018
Internal
Overview
new-app is a command that generates a JSON/YAML configuration. As the result of executing the command, the "app=<app-name>" label is set on all objects created as the result of the command.
For more details see:
Modes
- Create an Application from a Git Repository
- Create an Application from a Template
- Create an Application from a Docker Image
Dry Run
Specify
-o yaml|json
and no objects will be created, but only YAML|JSON output generated.
Options
-l, --labels
To set a single label on all objects of the new application:
oc new-app -l 'key1=value1' ...
To set multiple labels:
oc new-app -l 'key1=value1,key2=value2,key3=value3' ...
Do not use spaces within the -l '...'
Note that using "app=..." label will overwrite the default app label value set by the new-app command. The command line value takes precedence.
-p, --param
Set values for template parameters:
oc new-app -p "VOLUME_CAPACITY=2Gi"
oc new-app --param "VOLUME_CAPACITY=2Gi"
--name=
--name=something
The name of the generated application artifacts.