Create an application from OpenShift Template

  • 21 Dec, 2021

Openshift comes with a set of default templates, you can use oc get templates -n openshift to show them

Each template contains specifc sections

  • The objects section: defines a list of resources that will be created
  • The parameters section: defines parameters that are used in the template objects

1 - Inspect the template file for the parameters

I export the postgresql-ephemeral to a yaml file using :  oc get template postgresql-ephemeral -o yaml -n openshift > postgresql.yaml 

Then inspect the yaml file  oc process --parameters -f <filename.yaml>

2 - Create the application using oc process

oc process -f postgresql.yaml -l app=mydb -p DATABASE_SERVICE_NAME=dbservice -p POSTGRESQL_USER=dbuser \

-p POSTGRESQL_PASSWORD=yourpassword -p POSTGRESQL_DATABASE=books | oc create -f -

Related Posts

OpenShift Day 2 Operations - Part 3

  • 05 Nov, 2025

Retrieving OpenShift Cluster Logs Logs are invaluable for understanding the state of your OpenShift cluster and diagnosing problems. OpenShift provides several ways to access these logs efficiently:

OpenShift Day 2 Operations - Part 3Read More

OpenShift Day 2 Operations - Part 2

  • 19 Aug, 2025

“Day 2” operations refer to everything that happens after the cluster is installed, which could be a lot or a little, depending on how you plan to use the cluster. Effective troubleshooting and monit

OpenShift Day 2 Operations - Part 2Read More

OpenShift Day 2 Operations - Part 1

  • 29 Jul, 2025

“Day 2” operations refer to everything that happens after the cluster is installed, which could be a lot or a little, depending on how you plan to use the cluster. Verifying the Health of Your OpenS

OpenShift Day 2 Operations - Part 1Read More