mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
33 lines
923 B
Plaintext
33 lines
923 B
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * openshift_images/using-templates.adoc
|
|
|
|
[id="templates-uploading_{context}"]
|
|
= Uploading a template
|
|
|
|
If you have a JSON or YAML file that defines a template, for example as seen in
|
|
this example, you can upload the template to projects using the CLI. This saves
|
|
the template to the project for repeated use by any user with appropriate access
|
|
to that project. Instructions on writing your own templates are provided later
|
|
in this topic.
|
|
|
|
.Procedure
|
|
|
|
* Upload a template to your current project's template library, pass the JSON
|
|
or YAML file with the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f <filename>
|
|
----
|
|
|
|
* Upload a template to a different project using the `-n` option with the
|
|
name of the project:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f <filename> -n <project>
|
|
----
|
|
|
|
The template is now available for selection using the web console or the CLI.
|