LoadBalancer
What is LoadBalancer?
LoadBalancer: A Service that asks the cloud provider to provision an external load balancer with a public IP pointing at the Service. A Service of type LoadBalancer in Kubernetes asks the cloud provider to create an external load balancer with a public IP address, pointing at the pods behind the Service.
Frequently asked questions about LoadBalancer
How is LoadBalancer used in practice?
It is the simplest way to make one service reachable from the internet on a managed cluster. On a cluster without a cloud integration, the Service stays pending unless you install something like MetalLB.
What should you keep in mind with LoadBalancer?
Each LoadBalancer Service usually creates its own paid load balancer. With several public services, that adds up quickly. The common pattern is a single LoadBalancer Service in front of an Ingress controller, which then routes traffic to many internal services by host name and path. Use LoadBalancer directly for non-HTTP traffic, such as a TCP service that an Ingress cannot handle.
What does an example of LoadBalancer look like?
spec: type: LoadBalancer ports: - port: 443 targetPort: 8443 At a glance
| Category | Kubernetes |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |