cancel
Showing results for 
Search instead for 
Did you mean: 
Razi
Mission Specialist
Mission Specialist
  • 1,320 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
  • 538 Views

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

Datta_Kadam
Mission Specialist
Mission Specialist
  • 521 Views

Refer guided exercise Kubernetes Networking Objects topic.

Chetan_Tiwary_
Community Manager
Community Manager
  • 483 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 

Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Join the discussion
You must log in to join this conversation.