OpenShift 3 Deploying Application

From Dogtag
Jump to: navigation, search

Golang Hello Universe

To deploy gohellouniverse:

$ oc create -f{deployment,service}.yaml
$ oc expose svc/gohellouniverse

Open http://gohellouniverse-myproject.<IP address>

To enable TLS (see Using PKI ACME Responder with openshift-acme ):

$ oc patch route gohellouniverse -p '{"metadata":{"annotations":{"":"true"}}}'

To undeploy gohellouniverse:

$ oc delete routes/gohellouniverse
$ oc delete svc/gohellouniverse
$ oc delete deployment.apps/gohellouniverse

Node.js Example

To deploy nodejs-ex:

$ oc new-app -l name=myapp
$ oc expose svc/nodejs-ex

Open http://nodejs-ex-myproject.<IP address>

To undeploy nodejs-ex:

$ oc delete routes/nodejs-ex
$ oc delete svc/nodejs-ex
$ oc delete dc/nodejs-ex
$ oc delete is/nodejs-ex
$ oc delete bc/nodejs-ex

See Also