OpenShift: Deployment Using CLI -II

Install an application from source code using oc new-app.

To install an application’s source code in a GitHub repository into OpenShift, use oc CLI tool and enter the following command in a terminal window:

$ oc new-app

Expose the service.
$ oc expose svc/ruby-hello-world

Get URL to access from externally:

Check App pod status from OpenShift console:

Delete the application using the oc CLI:

1. Run the following command in the terminal window on your local machine to delete all the resources associated with the Ruby application deployed above.

[root@localhost openshift]# oc get deployments
ruby-hello-world 1/1 1 1 15m
workspacec874d0a7d1d94c4b 0/0 0 0 14d
$ oc delete all -l app=ruby-hello-world