- A BuildConfig to build the application image.
- An ImageStream to tag and track the resulting image.
- A DeploymentConfig (or Deployment) to run the web application.
- A DeploymentConfig to run PostgreSQL.
- Services to expose the database to the application and the application internally.
- A Route to expose the application to external users.
- A Secret used to store and pass the database credentials securely.
- A set of template parameters shown in the web console wizard (application name, namespace, Git repository, etc.).

objects array and substitutes parameter values where specified.
Minimum structure of a Template YAML
- The
objectsarray contains the resource manifests that will be created when the template is processed. - Use template parameters (e.g.,
${APP_NAME}) inside manifests to substitute user-provided values at instantiation time. - Secrets remain OpenShift Secret objects; templates usually parameterize sensitive values or generate them during instantiation.
- Avoid including runtime-only fields (for example
status,metadata.resourceVersion,metadata.uid) when converting exported resources into template objects.
Creating and registering a template
- Save your Template YAML (for example
template-config.yml). - Create the template in your project with:
- Remove runtime fields such as
status,metadata.resourceVersion,metadata.uid, andmetadata.creationTimestamp. - Replace environment-specific values with template parameters (for example replace
my-appwith${APP_NAME}). - Ensure any
${PARAM_NAME}used in the template is declared in theparameterssection.
When parameterizing manifests, use
\${PARAM_NAME} (e.g., ${APP_NAME}) inside the YAML so OpenShift will substitute those values at instantiation time. Also avoid including runtime-only fields such as status or resourceVersion when adding exported resources to a template.