DEV Community

Cover image for How to deploy an application using Templates in OpenShift?
Sagar Jadhav
Sagar Jadhav

Posted on • Originally published at developersthought.in

2

How to deploy an application using Templates in OpenShift?

Objective

  • Create project my-project
  • Deploy PHP Application using Templates

Step 1: Set up Openshift environment

Go to Katacoda.com & click on start scenario

Step 2: Create project my-project

oc new-project my-project
Enter fullscreen mode Exit fullscreen mode

Step 3: Update permissions

setenforce 0
Enter fullscreen mode Exit fullscreen mode

Step 4: List templates

oc get templates -n openshift
Enter fullscreen mode Exit fullscreen mode

Step 5: Describe php template

oc describe template cakephp-mysql-persistent -n openshift
Enter fullscreen mode Exit fullscreen mode

Step 6: Deploy php application

oc new-app cakephp-mysql-persistent --name cakephp -l app=demo
Enter fullscreen mode Exit fullscreen mode
oc get pods --watch
Enter fullscreen mode Exit fullscreen mode

Step 7: List route

oc get route
Enter fullscreen mode Exit fullscreen mode

Step 8: Access application

From browser, Browse http://<ROUTE_URL>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of PulumiUP 2025

Let's talk about the current state of cloud and IaC, platform engineering, and security.

Dive into the stories and experiences of innovators and experts, from Startup Founders to Industry Leaders at PulumiUP 2025.

Register Now

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay