Module 4: Load Balancing & Ingress
🏗️ 1. The Manual Task: Hardcoded Reverse Proxies
When multiple web services are exposed publicly, an SRE traditionally maintains a centralized Nginx or HAProxy.
The Manual Steps:
- Configure Nginx: Manually write and update
nginx.confwith proxy rules (e.g.,location /api { proxy_pass http://192.168.1.10:8080; }). - Reload Configuration: Manually run
nginx -s reload. - Manage Certificates: Manually obtain and install SSL certificates for every domain.
🛣️ 2. The Kubernetes Abstraction: Ingress Controllers
An Ingress object allows developers to define routing rules alongside their application code.
- Developer Self-Service: Developers write simple YAML rules for their own routes (e.g.,
path: /api). - Dynamic Configuration: The Ingress Controller (like
ingress-nginx) watches the API and reconfigures itself in real-time. - TLS Termination: Ingress objects can store and manage SSL/TLS certificates automatically.