Configure Alauda Container Platform Load Balancer
TOC
PrerequisitesConfigure MetalLB ComponentsConfigure an External IP Pool by using the web consoleConfigure BGP Peers by using the web consoleConfigure an External IP Pool with L2Advertisement or BGPAdvertisement by using the CLISeparate management and service networksMonitor MetalLBView the built-in MetalLB dashboardAccess the MetalLB metrics endpointMetalLB metrics referenceTroubleshooting MetalLBTrademark NoticePrerequisites
Please ensure that you have read the Installation documentation before proceeding.
Configure MetalLB Components
Configure the MetalLB custom resource's spec.controllerNodeSelector, spec.controllerTolerations, spec.nodeSelector, and spec.speakerTolerations fields after installing the Cluster Plugin. See Configure Component Placement for the configuration example and the relationship with L2Advertisement.spec.nodeSelectors.
To adjust the controller and speaker log level, set spec.logLevel on the same resource. See Adjust Log Level for supported values.
Configure an External IP Pool by using the web console
-
Go to Administrator.
-
In the left navigation bar, click Networking > External IPs > External IP Pools.
-
Click Create External IP Pools.
-
Refer to the following instructions to configure certain parameters.
-
Click Create.
Configure BGP Peers by using the web console
-
Go to Administrator.
-
In the left navigation bar, click Networking > External IPs > BGP Peer.
-
Click Create BGP Peer.
-
Refer to the instructions below to configure the parameters.
-
Click Create.
Note: When you use BGP mode, allow TCP port 179 between each BGP peer and the MetalLB speaker nodes. If you configure a custom peer port, allow the configured port instead.
Configure an External IP Pool with L2Advertisement or BGPAdvertisement by using the CLI
BGP mode
Separate management and service networks
If each cluster node has a management interface (used for the Kubernetes node address) and a separate service interface, configure the service-network IP pool and limit the L2 advertisement to that interface:
The interface name is evaluated in the host network namespace used by the
MetalLB Speaker. It must be present, with connectivity to the VIP range, on
each node selected by nodeSelectors. This setting is for L2 ARP/NDP
announcements only; it does not provision the second NIC or configure VLANs,
routes, or Pod network attachments. If interfaces is not set, MetalLB uses
all eligible interfaces on the announcing node. Use the BGP peer and local-IP
settings for BGP mode instead.
Monitor MetalLB
After you configure MetalLB, you can use the built-in dashboard and monitoring metrics to observe IP address allocation and BGP session status.
Note: The built-in MetalLB dashboard is available in ACP 4.4.
View the built-in MetalLB dashboard
-
Go to Operations Center.
-
In the left navigation bar, click Monitoring > Monitoring Dashboards.
-
Search for MetalLB, and then open the dashboard.
The built-in MetalLB dashboard includes the following panels:
Access the MetalLB metrics endpoint
MetalLB exposes controller and speaker metrics through monitor Services in the metallb-system namespace. You can access these metrics from inside the cluster to confirm whether the components expose metrics correctly.
Check the MetalLB monitor Services:
Check the Service endpoints:
The endpoint addresses use port 17472 by default.
Query the controller metrics endpoint from inside the cluster:
Query a speaker metrics endpoint from inside the cluster:
If the command returns MetalLB metrics, the component metrics endpoint is available.
MetalLB metrics reference
The built-in MetalLB dashboard uses the following metrics:
Troubleshooting MetalLB
To see more Troubleshooting MetalLB
Trademark Notice
MetalLBâ„¢ is a trademark of The Linux Foundation.
Alauda is an independent vendor. This product is not affiliated with, endorsed by, or sponsored by The Linux Foundation. All trademarks are the property of their respective owners and are used here for identification purposes only.