MetalLB: Load Balancing for Bare-Metal Kubernetes

Shriira Press

Preface

How MetalLB brings real network load balancing to bare-metal Kubernetes using nothing more than the standard routing protocols your network already speaks.

Welcome to MetalLB: Load Balancing for Bare-Metal Kubernetes.

When you run Kubernetes on a cloud provider, a Service of type LoadBalancer quietly conjures a real load balancer out of the provider's infrastructure. On your own hardware there is no such magic, and the field is left empty forever. MetalLB fills that gap. It is a load-balancer implementation for bare-metal clusters that hands out IP addresses from pools you control and announces them to the surrounding network using ordinary protocols — ARP and NDP in layer 2 mode, or BGP when you want routers to share the load. This book starts with the problem MetalLB exists to solve, then opens up its two-part design of controller and speaker. From there it works through address allocation and IP pools, the mechanics of layer 2 mode and BGP mode, installation and the FRR backend, and the day-to-day business of exposing services with annotations and traffic policies. A closing chapter steps back to look at where MetalLB fits, how teams run it well, and what to watch for in production.

This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.

A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.

We hope it serves you well.

— Shriira Press

Contents

  1. Chapter 1 — The Empty External IP
  2. Chapter 2 — Controller and Speaker
  3. Chapter 3 — Address Allocation and IP Pools
  4. Chapter 4 — Layer 2 Mode
  5. Chapter 5 — BGP Mode
  6. Chapter 6 — Installation and the FRR Backend
  7. Chapter 7 — Using MetalLB Day to Day
  8. Chapter 8 — MetalLB in Practice
0%
1/1