Search code examples
openshifthaproxyopenshift-origin

How to configure openshift route & router to expose public service


I have an openshift origin cluster running in aws.
I deployed a "hello world!" application with the web console. the default route has been created: http://demo-demo.router.default.svc.cluster.local/ this route is only available in the cluster.

Assuming I have a domain www.example.com, How to create a public route and configure it to work with my domain?

I found many docs about route and router openshift but I cant make it work properly.


Solution

  • Modify /etc/origin/master/master-config.yaml:

    routingConfig:
      subdomain: apps.example.com
    

    and restart openshift master.

    systemctl restart atomic-openshift-master-api atomic-openshift-master-controllers
    

    Then new routes will be named $SVC-$NAMESPACE.apps.example.com.