This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.10.2. 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:
oc create -f <filename>
$ oc create -f <filename>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Upload a template to a different project using the
-n
option with the name of the project:oc create -f <filename> -n <project>
$ oc create -f <filename> -n <project>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The template is now available for selection using the web console or the CLI.