liveBook · Manning

Host-based routing

As explained in Kubernetes for Developers

Host-based routing directs requests to different backends according to the hostname in the request.

Host-based routing sends requests to different Kubernetes Services by inspecting the HTTP Host header. One Ingress can expose several services through a shared external IP. section 7.2

One address, multiple services

A single external IP can serve both hostname-based applications. This can reduce load-balancing costs compared with assigning each LoadBalancer Service its own IP, though provider billing rules vary. section 7.2

How Kubernetes for Developers covers it

How deep it goes
Explains Host-header routing and manifests, but defers detailed controller implementation and cloud provisioning.
Examples
Demonstrates timeserver.example.com and robohash.example.com routing to separate internal Services.
What it assumes
Assumes Kubernetes Services and HTTP requests, while showing the NodePort configuration required by the Ingress.
What you can do after
Build it from scratch by defining hostname rules that route requests to Kubernetes Services.
How it connects
Connects Ingress with Services, NodePort, HTTP load balancing, and cloud-provider billing.

Also explained in

Compare how 2 books explain host-based routing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.