Defining Rules per Host
Explore how to configure Kubernetes Ingress rules to serve different services on separate hosts by using host headers. Understand how to test host routing locally by modifying the DNS or request headers, enabling accurate HTTP traffic management for multiple domains.
We'll cover the following...
We'll cover the following...
Serving services in different hosts
So that’s nice! Now we can direct requests to the service we want based on the path we receive, such as / to nginx, /hello to hellok8s.
In practice, though, we usually will want to serve our services in different hosts. For example, we could want to serve nginx in http://nginx.example.com and hellok8s in http://hello.example.com.
Let’s see how we can change this Ingress to do that.
It’s pretty much the same manifest with two changes:
- Instead of