MetalLB for Layer 4 Load Balancing
Kubernetes does not offer an implementation of network load balancers (Services of type LoadBalancer) for bare-metal clusters. Bare-metal cluster operators are left with two types of Services, NodePort and externalIPs, to bring user traffic into their clusters. MetalLB aims to redress this imbalance by offering a network load balancer implementation, so that external services on bare-metal clusters can work better. For details about MetalLB, see the official projects of the community and the MetalLB official website.
This section describes how to create and use MetalLB in on-premises clusters.
Constraints
Currently, MetalLB can be installed only in on-premises clusters.
Prerequisites
You have enabled BGP for your on-premises cluster and configured LOAD_BALANCER_CIDR to broadcast the load balancer CIDR block to the underlying network.
Installing MetalLB
- Log in to the UCS console.
- In the navigation pane, choose Operator Service Center.
- Search for MetalLB in the service center and click the name of MetalLB to access its details page.
Figure 1 Searching for MetalLB
- Subscribe to MetalLB, click Create Instance, and select the target cluster. Complete the installation as prompted.
Function Verification
- Access the cluster details page.
- If the cluster is not added to any fleet, click the cluster name.
- If the cluster has been added to a fleet, click the fleet name. In the navigation pane, choose Clusters > Container Clusters.
- In the navigation pane, choose Workloads. On the displayed page, click Create from Image.
- Select an available image to create a workload and add a LoadBalancer Service. For details, see Workload Service Configuration.
- Click the service name, copy the IP address of the load balancer for access from a node outside the cluster to verify that the access is successful.
Figure 2 Load balancer IP address
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot