<p>I'm new to kubernetes and openshift (came from docker swarm world) and I'm having trouble with some of kubernetes and openshift documentation especially related to <strong>route</strong> and <strong>services</strong>. I was looking for how to expose a replica set of containers externally and I've found <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/" rel="noreferrer">kubernetes documentation</a> uses a service to expose the pod while <a href="https://docs.openshift.com/container-platform/3.9/architecture/networking/routes.html" rel="noreferrer">openshift uses routes</a>. can anyone explain to me the differences?</p>

tkyass
<p>There are only minor differences in tools being used. OpenShift is a Kubernetes distribution, this means it is a collection of opinionated pre-selected components. So for Ingress, OpenShift uses HAProxy to get (HTTP) traffic into the cluster. Other Kubernetes distributions maybe use the NGINX Ingress Controller or something similar.</p>

<p>So <code>Services</code> are used to loadbalance traffic inside the cluster. So when you create a <code>ReplicaSet</code>, you'll have multiple Pods running. To "talk" to these Pods, you typically create a <code>Service</code>. That <code>Service</code> will distribute the traffic evenly between your Pods.</p>

<p>So to get HTTP(S) traffic from the outside to your <code>Service</code>, OpenShift uses <code>Routes</code> (<code>Ingress</code> in other Kubernetes distributions):</p>

<pre><code>                                            +-----+
                                        +--&gt;+ Pod |
           +-------+       +---------+  |   +-----+
Traffic---&gt;+ Route +------&gt;+ Service +--+--&gt;+ Pod |
           +-------+       +---------+  |   +-----+
                                        +--&gt;+ Pod |
                                            +-----+
</code></pre>

<p>So to expose your application to the outside world, you typically create an internal <code>Service</code> using <code>oc create service</code> and then create a <code>Route</code> using <code>oc expose</code>:</p>

<pre><code># Create a new ClusterIP service named myservice
oc create service clusterip myservice --tcp=8080:8080
oc expose service myservice
</code></pre>
