Exposing Your Services: Kubernetes Ingress with Traefik and MetalLB
How to Get External Traffic into Your Cluster
Once your application is running in the cluster, how do people access it from the outside? The ‘Ubuntu System Administration Guide’ explains the two key components needed for on-premise clusters: a Load Balancer and an Ingress Controller.
MetalLB: The On-Premise Load Balancer
In the cloud, you can request a load balancer from the cloud provider. On your own hardware, you need a tool to provide this functionality. The book shows how to install MetalLB, which can assign an IP address from your local network to a Kubernetes service, making it externally accessible.
Traefik: The Ingress Controller
An Ingress Controller acts as a reverse proxy or ‘smart router’ for your cluster. It receives traffic from the load balancer and routes it to the correct internal service based on the requested hostname or URL path. The book guides you through installing the popular Traefik Ingress Controller using a Helm chart. By creating an ‘Ingress’ resource, you can define rules like ‘route traffic for wordpress.home.lan to the WordPress service’.
This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13