Diagram
Internet clients split to Network Load Balancing via Service type LoadBalancer for TCP/UDP and to HTTP(S) Load Balancing via Ingress for content-based routing, both distributing traffic to Nodes and Pods in a GKE cluster.
How Load Balancing Distributes Traffic in GKE
Load balancing in GKE distributes incoming traffic across multiple containers, nodes, and Pods so large web architectures can share traffic demand. Traffic flows from internet clients to the load balancer, and the load balancer forwards the traffic to the available GKE endpoints. GKE supports two main approaches that differ in simplicity, protocol support, and routing intelligence.
| Option | How it is enabled | What it routes on |
|---|---|---|
| Network load balancing | Add type: LoadBalancer to the service configuration file, which uses Compute Engine network load balancing with forwarding rules that point to target pools listing available instances | Incoming internet protocol data such as address, port, and protocol type, including additional TCP/UDP protocols such as SMTP traffic, while the app can directly inspect packets |
| HTTP(S) load balancing | Create a Kubernetes Ingress resource, which provisions and configures the Compute Engine HTTP/HTTPS load balancer from a collection of rules for routing external traffic to Kubernetes endpoints | Advanced HTTP behavior such as HTTPS, content-based routing, and cross-region routing |
Domain 2 of 6
27 practice questions
Practice this DomainLast updated