content_image/772740.jpg
In OpenShift, routes are created by using routers which are deployed by OpenShift admin on the cluster. Routers are used to bind HTTP (80) and https (443) ports to external applications. 

Following are the different kinds of protocol supported by routes: 

 HTTP 

 HTTPS 

 TSL and web socket 

When configuring the service, selectors are used to configure the service and find the endpoint using that service. Following is an example of how we create a service and the routing for that service by using an appropriate protocol. 

{ "kind": "Service", "apiVersion": "v1", "metadata": { "name": "Openshift-Rservice" }, "spec": { "selector": { "name":"RService-openshift" }, "ports": [ { "protocol": "TCP", "port": 8888, "targetPort": 8080 } ] } } 

Next, run the following command and the service is created. 

$ oc create -f ~/training/content/Openshift-Rservice.json 

<img src='content_image/772740.jpg'>

