Skip to content

OpenShift 3 Deploying Application

Endi S. Dewata edited this page Sep 15, 2023 · 1 revision

Golang Hello Universe

To deploy gohellouniverse:

$ oc create -fhttps://raw.githubusercontent.com/tnozicka/gohellouniverse/master/deploy/{deployment,service}.yaml
$ oc expose svc/gohellouniverse

Open http://gohellouniverse-myproject..nip.io.

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

$ oc patch route gohellouniverse -p '{"metadata":{"annotations":{"kubernetes.io/tls-acme":"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 https://github.com/sclorg/nodejs-ex -l name=myapp
$ oc expose svc/nodejs-ex

Open http://nodejs-ex-myproject..nip.io.

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