Skip to content

Deploying Tomcat on OpenShift

Endi S. Dewata edited this page Feb 18, 2023 · 1 revision

To deploy Tomcat on OpenShift:

$ oc new-app tomcat

To expose Tomcat with a default hostname:

$ oc expose svc/tomcat

To expose Tomcat with a proper hostname:

$ oc expose svc/tomcat --name server.example.com --hostname server.example.com

Then create a CNAME record:

server.example.com. IN CNAME <default hostname>.