Bootstrap FreeKB - OpenShift - Create load balance service using the oc create service command
OpenShift - Create load balance service using the oc create service command

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

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.

  • clusterip
  • externalname
  • loadbalancer
  • nodeport

In this example, a load balancer service named lb-service is created.

~]$ oc create service loadbalancer lb-service --tcp=8080
service/lb-service created

 

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 418154 in the box below so that we can be sure you are a human.