LoadBalancer, GKE automatically provisions and configures the appropriate Google Cloud load balancer, streamlining your networking setup.
Load Balancer Types in GKE
GKE supports two main load balancer types. Choose the one that matches your application’s accessibility and security requirements:External Load Balancer
An External Load Balancer Service provisions a publicly accessible IP address. It routes traffic from clients outside your VPC to pods running in your GKE cluster—ideal for web applications, APIs, and services that require Internet exposure.Internal Load Balancer
An Internal Load Balancer Service uses an IP address from your VPC’s subnet. This setup routes traffic privately within the VPC or across peered networks, perfect for multi-tier architectures or services that must remain internal.
Internal Load Balancer Services do not allocate a public IP. Ensure your subnets and firewall rules allow traffic between your services and clients within the VPC.

Configuring a LoadBalancer Service
The behavior of your load balancer is driven by fields in the Kubernetes Service manifest. Below is a sample configuration followed by key parameter descriptions.Reserving a static IP using
gcloud compute addresses create ensures your LoadBalancerIP remains unchanged after service updates or rescheduling.External Traffic Policy
Control how the load balancer forwards requests and preserves source IP:-
Cluster (default):
- Source IP is replaced by the node’s IP (SNAT).
- Distributes traffic evenly across all healthy pods.
-
Local:
- Preserves the original client IP.
- Direct Server Return ensures responses go back directly to clients, reducing latency.
GKE Subsetting for Layer-4 Internal Load Balancing
GKE subsetting optimizes internal load balancers by limiting the backend nodes to only those running active pods for a service:- Creates a Network Endpoint Group (NEG) per service per zone.
- Registers only nodes with at least one ready pod.
- Improves performance and scales efficiently in large clusters.
In a zonal cluster with 3 nodes and 2 internal services:
- Enabling subsetting creates 2 NEGs per zone.
- Each NEG contains only the nodes hosting the corresponding service.
- Traffic is distributed solely to relevant nodes, optimizing resource usage.
References
- GKE Service Load Balancing
- Kubernetes Service Type LoadBalancer
- Google Cloud Load Balancing Documentation