What is a Kubernetes LoadBalancer Service?
A Kubernetes LoadBalancer Service is a Service with type: LoadBalancer that asks the cloud provider for an external load balancer. The provider creates it, gives it a public address and forwards its traffic to the pods the Service selects. Clients outside the cluster connect to that one address and never need to know where the pods run.
Think of a company switchboard with one public phone number. Callers dial the same number every time, and the operator puts them through to whichever desk is free. Staff can move desks or go home without anyone outside having to learn a new number.
How does a LoadBalancer Service work?
Kubernetes has three Service types that stack on top of each other. Each one adds a way in from further outside.
ClusterIP
ClusterIP is the default type. The Service gets a virtual IP address that is reachable only from inside the cluster, and traffic to it is spread across the matching pods.
NodePort
A NodePort Service also gets a cluster IP. On top of that, every node opens the same port, by default from the range 30000 to 32767, and forwards it to the Service.
LoadBalancer
A LoadBalancer Service usually starts out as a NodePort Service. The cloud controller manager then creates the external load balancer and points it at that node port on each node. Creation happens in the background, so the public address shows up in the Service’s status.loadBalancer field once it is ready.
How the load balancer spreads traffic and checks health is up to the provider, not Kubernetes. Provider annotations on the Service usually control details such as internal-only addresses, which is why they change when you move clusters between clouds.
Which settings matter most?
A few fields change how a LoadBalancer Service behaves:
externalTrafficPolicy: Clusteris the default. It spreads load well, but can add a second hop to another node and hides the client’s source IP.externalTrafficPolicy: Localkeeps the client IP and skips the extra hop, but only nodes running a matching pod get traffic, so load can be uneven.loadBalancerClasspicks a load balancer implementation other than the provider default. It cannot be changed after it is set.allocateLoadBalancerNodePorts: falseskips the node ports, for load balancers that send traffic straight to pods.
When is it the wrong fit?
Each LoadBalancer Service gets its own load balancer and address, and each one is usually billed on its own. Ten web apps exposed this way means ten load balancers to pay for and ten addresses to manage.
For HTTP traffic, the common pattern is one LoadBalancer Service in front of an ingress or Gateway controller. That controller then routes requests to many Services by hostname and path, and handles TLS in one place. Plain LoadBalancer Services remain a good choice for TCP and UDP protocols such as databases, MQTT or game servers.
How enum handles LoadBalancer Services
On enum Networking, a Kubernetes Service of type LoadBalancer gets an L4 load balancer for TCP and UDP with automatic failover and an IPv4 address included. Nodes have no public IP addresses, so all inbound traffic enters through load balancers. For HTTP routing you run your own ingress or Gateway controller behind one, and client IP preservation is not available yet.
FAQ
Why does my Service show EXTERNAL-IP as pending? The load balancer is created in the background, so a short wait is normal. If it stays pending, the cluster probably has no cloud controller that supports load balancers, or the provider rejected the request. Check the Service events.
Can one LoadBalancer Service serve both TCP and UDP? Kubernetes allows different protocols on the ports of one LoadBalancer Service, and this has been stable since version 1.26. The provider still decides which protocols and combinations it accepts, so check its limits first.
Is a LoadBalancer Service the same as an Ingress? No. A LoadBalancer Service forwards TCP or UDP connections to one set of pods. An Ingress or Gateway routes HTTP requests by hostname and path, and itself usually sits behind a LoadBalancer Service.