Skip to Content
Learn OpenShift
book

Learn OpenShift

by Denis Zuev, Artemii Kropachev, Aleksey Usov
July 2018
Intermediate to advanced
504 pages
11h 34m
English
Packt Publishing
Content preview from Learn OpenShift

Managing routes in OpenShift

OpenShift has an elegant way of exposing a service so that it can be accessed from the outside of an OpenShift cluster. This resource is called a router in OpenShift. OpenShift provides an external hostname mapping to a load balancer that distributes traffic among OpenShift services:

OpenShift router workflow

In order for the OpenShift router to load balance external traffic, it has to use HTTP or HTTPS protocol, and be resolvable by DNS using DNS wildcards.

Let's expose our service outside of the OpenShift cluster by running the oc expose command with additional parameters:

$ oc expose service/ruby-ex-1-zzhrc ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Operating OpenShift

Operating OpenShift

Rick Rackow, Manuel Dewald
OpenShift for Developers, 2nd Edition

OpenShift for Developers, 2nd Edition

Joshua Wood, Brian Tannous
Kubernetes: Up and Running, 2nd Edition

Kubernetes: Up and Running, 2nd Edition

Brendan Burns, Joe Beda, Kelsey Hightower

Publisher Resources

ISBN: 9781788992329Supplemental Content