liveBook · Manning

Layer-7 load balancer

As explained in Google Anthos in Action

A layer 7 load balancer routes application traffic using information from protocols such as HTTP.

A layer-7 load balancer handles HTTP(S) traffic entering a cluster. In GKE, it is a specialized external load balancer configured through a Kubernetes Ingress resource. Unlike the external and internal TCP/L4 load balancers described alongside it, it uses Ingress rules to route traffic to Kubernetes Services. section 10.2.1

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: demo
spec:
  rules:
  - host: demo.example.com               #1
    http:
      paths:
      - backend:
          serviceName: frontend          #1
          servicePort: 80                #1
  - host: demo-backend.example.com       #2
    http:
      paths:
      - backend:
          serviceName: users             #2
          servicePort: 8080              #2

The Ingress manifest routes requests for two different hostnames to different Services and ports. section 10.2.1

Plan the Service backends and their ports before defining host rules. If Ingress provisioning reports a required firewall change, inspect its events with `kubectl describe ingress INGRESS_NAME` and coordinate the indicated network update with an administrator. section 10.2.1

How Google Anthos in Action covers it

How deep it goes
Distinguishes Ingress-based HTTP(S) routing from TCP/L4 load balancing and supplies manifests and a firewall troubleshooting command; does not detail protocol internals.
Examples
Shows an Ingress routing two hostnames to separate Services and an event reporting a required firewall change.
What it assumes
Assumes familiarity with Kubernetes Services and cluster networking while showing the Ingress configuration directly.
What you can do after
Apply it via Kubernetes Ingress to route HTTP(S) requests by hostname and inspect provisioning events when firewall changes are needed.
How it connects
Connects Kubernetes Ingress, Services, hostname rules, VPC networking, and firewall rules.

Also explained in

Compare how 2 books explain layer-7 load balancer →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.