OpenShift template overview
An OpenShift template is a set of API resources that can be parameterized and processed to produce a list of objects for creation by OpenShift. A template can be processed to create any desired OpenShift objects (such as deployment configurations, build configurations, and so on). A template can also define a set of labels to apply to every object defined in the template. You can apply a template by using the CLI or the web console. For example, a template might contain two pods (an application and a database), a service, and a route. Once the template has been developed, you can reuse it.
Template syntax
Templates, like any other OpenShift resources, can be created from a raw YAML or JSON definition. An example is as follows:
# cat mytemplate.yaml apiVersion: v1 kind: Template metadata: name: template1 objects: - apiVersion: v1 kind: Pod metadata: name: app1 spec: containers: - env: - name: SHOW_DATA value: ${SHOW_DATA} ...