Similarly to Kubernetes, OpenShift services represent an interface between clients and the actual application running in the pods. A service is an IP:port pair which forwards traffic to backend pods in a round-robin fashion.
By running the oc new-app command, OpenShift creates a service automatically. We can verify this by running the oc get services command:
$ oc get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ruby-ex 172.30.173.195 <none> 8080/TCP 1h
The output is similar to what we got with the kubectl get services command in Kubernetes. We can delete and recreate this service again by running the oc delete and oc expose commands. Before we do that, run the curl command inside the Minishift VM to verify that the service is up and running:
$ minishift ssh "curl -I -m3 172.30.173.195:8080"...