Insecure Routes

Insecure routes correspond to traffic that is not encrypted. The easiest and preferred way to create a route (secure or insecure) is to use the oc expose service service command, where service corresponds to a service. Use the --hostname option to provide a custom host name for the route.

 oc expose service api-frontend \
> --hostname

When omitting the host name, OKD generates a host name for you with the following structure: <route-name>-<project-name>.<default-domain>

For example, if you create a frontend route in a api project, in a cluster that uses as the wildcard domain, then the route host name will be:

The DNS server that hosts the wildcard domain is unaware of any route host names; it only resolves any name to the configured IPs. Only the OKD router knows about route host names, treating each one as an HTTP virtual host.

Invalid wildcard domain host names, that is, host names that do not correspond to any route, are blocked by the OKD router and result in an HTTP 404 error.