cancel
Showing results for 
Search instead for 
Did you mean: 
Razi
Mission Specialist
Mission Specialist
  • 1,032 Views

Nodeport Service Loadbalancer for two VMs

How we can create and use a node port service, which should serve as a Load Balancer b/w two VMs created in the OCP? 

3 Replies
Artemis-NASA
Flight Engineer
Flight Engineer
  • 250 Views

you can add service name and port and the end you have to add nodeport:loudBalancer 

Datta_Kadam
Mission Specialist
Mission Specialist
  • 233 Views

Refer guided exercise Kubernetes Networking Objects topic.

Chetan_Tiwary_
Community Manager
Community Manager
  • 195 Views

@Razi You can do that by following the below steps :

1. Edit the VirtualMachine manifest to add the label for service creation. Add label: key to the spec.template.metadata.labels 

2. Create a Service manifest to expose the VM. The label: key label applied in step 1 above must match the label in the spec.selector attribute of the Service manifest.

3. Specify type of service as NodePort. 

4. Specifies a collection of network ports and protocols that you want to expose from the virtual machine. Create the manifest using either web UI or CLI ( oc create -f ... ).

5. Restart the VM to apply changes.

 

Refer this video ( though it used ClusterIP but you can get an idea on how to do it via web UI ) : https://www.youtube.com/watch?v=JhCznR-bU2M 

Darin Sorentino, Principal Specialist Solution Architect from Red Hat is going to show how to use a load balancer on OpenShift Virtualization. Learn more here - https://www.redhat.com/en/technologies/cloud-computing/openshift/virtualization
Join the discussion
You must log in to join this conversation.