How to deploy an application using Templates in OpenShift?

sagarjadhv23

Sagar Jadhav

Posted on May 6, 2020

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

💖 💪 🙅 🚩
sagarjadhv23
Sagar Jadhav

Posted on May 6, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related