liveBook · Manning

MetalLB

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

MetalLB is a Kubernetes load-balancer implementation that provides external load-balancing capabilities for clusters without an integrated cloud load balancer.

MetalLB provides load-balancing for Kubernetes clusters such as kind, allowing a LoadBalancer Service to receive an externally reachable IP without an integrated cloud load balancer. section 5.3.1 section 6.4.3

Deploy and configure MetalLB as an operational workflow:

  • Install the chart with helm install metallb metallb/metallb --values values.yaml; the values file configures chart parameters in YAML. section 5.3.1
  • Configure an IPAddressPool and L2Advertisement, using an address range that matches the node network’s address prefix. section 6.4.3
  • Expose an application by changing its Service type to LoadBalancer, then inspect EXTERNAL-IP with kubectl get svc. section 6.4.3

Expose Apache through MetalLB

After configuring the pool 172.18.255.1-172.18.255.50 and applying the layer-2 resources, apache-svc reports type LoadBalancer and EXTERNAL-IP 172.18.255.1. Running curl 172.18.255.1 returns the Apache response.

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains Helm installation, node-network-based address configuration, layer-2 resources, service exposure, and curl verification.
Examples
Uses a kind cluster, an Apache Service, a 172.18.255.1–172.18.255.50 pool, kubectl output, and curl verification.
What it assumes
Assumes a running kind cluster and basic Helm and kubectl usage, while demonstrating node-IP discovery and Service exposure.
What you can do after
Operate MetalLB by installing its Helm chart or manifests, assigning an address pool, exposing a Service, and verifying external access.
How it connects
Connects Kubernetes Services with Helm, LoadBalancer, NodePort, ClusterIP, IPAddressPool, and L2Advertisement resources.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.