If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.
- Using an OpenShift route (this is the most common)
- Using an ingress route
- Using a load balancer service
- Assign an external IP address to a service
A service can be used to load balance requests across pods.
The oc create service command can be used to create these type of services.
In this example, a load balancer service named lb-service is created.
~]$ oc create service loadbalancer lb-service --tcp=8080
The oc get services command should show the service has been created. In this example that the service is listening on port 8080.
~]$ oc get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
lb-service LoadBalancer 10.14.52.14 <pending> 8080:30632/TCP 51s