DNS resolution for a host name is handled separately from routing; your administrator may have configured a cloud domain that will always correctly resolve to the OpenShift Online router, or if using an unrelated host name you may need to modify its DNS records independently to resolve to the router.
You can create unsecured and secured routes routes using the web console or the CLI.
Using the web console, you can navigate to the Browse → Routes page, then click Create Route to define and create a route in your project:
Using the CLI, the following example creates an unsecured route:
$ oc expose svc/frontend
The new route inherits the name from the service unless you specify one
apiVersion: v1 kind: Route metadata: name: frontend spec: to: kind: Service name: frontend
Unsecured routes are the default configuration, and are therefore the simplest
to set up.
offer security for connections to remain private. To create a secured HTTPS route
encrypted with the default certificate for OpenShift Online 3
you can use the
create route command.
TLS is the replacement of SSL for HTTPS and other encrypted protocols.
$ oc create route edge --service=frontend
apiVersion: v1 kind: Route metadata: name: frontend spec: to: kind: Service name: frontend tls: termination: edge
Custom route hosts are not permitted. Instead, the following host template is enforced on all user routes:
Also, custom certificates are not permitted. Only unencrypted routes, edge routes using the default certificate, and passthrough routes work. Edge routes with custom certificates and re-encrypt routes (which necessarily have custom certificates) do not work.
These restrictions are enforced in the router. Inspecting the route in the
console or using
oc get routes displays the host and certificates specified by
the user. However, custom hosts are not respected, and routes with custom
certificates do not work.