OpenShift Route Operations: Difference between revisions
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
If --hostname is not specified, the standard <appname>-<projectname>.<[[OpenShift_Concepts#Default_Routing_Subdomain|default-routing-subdomain]]> | If --hostname is not specified, the standard <appname>-<projectname>.<[[OpenShift_Concepts#Default_Routing_Subdomain|default-routing-subdomain]]> | ||
Note that if --path is used, the value must begin with "/", otherwise the "oc expose" command will fail. | Note that if --path is used, the value must begin with "/", otherwise the "oc expose" command will fail. <font color=red>TODO: 'path' requires research, an attempt to use it led to application being rendered inaccessible.</font> | ||
=Specifying Termination Policy= | =Specifying Termination Policy= |
Revision as of 21:21, 27 November 2017
Internal
Overview
Route Information
oc get route
oc edit route nexus
Expose a Service
Expose a service externally:
oc expose service <service-name> [--hostname=<fully-qualified-external-name>] [--port=<target-port>] [--path=/<target-path>]
If --hostname is not specified, the standard <appname>-<projectname>.<default-routing-subdomain>
Note that if --path is used, the value must begin with "/", otherwise the "oc expose" command will fail. TODO: 'path' requires research, an attempt to use it led to application being rendered inaccessible.
Specifying Termination Policy
In some cases, services were not publicly exposed because their route did not have a termination policy. To add a termination policy:
oc edit route <route-name>
and then
spec: ... tls: insecureEdgeTerminationPolicy: Redirect termination: edge ...
Unsecure Routes
Unsecure routes do not seem to work, investigate and write down. One idea is that it has to do with the HAProxy configuration that simply does not handle http: