Recall & Review
beginner
What is host-based routing in Kubernetes?
Host-based routing directs incoming traffic to different services based on the hostname in the request URL. It helps serve multiple websites or apps from the same IP address.
Click to reveal answer
beginner
Which Kubernetes resource is commonly used to configure host-based routing?
The Ingress resource is used to define rules for host-based routing, specifying which hostnames map to which backend services.
Click to reveal answer
intermediate
How does host-based routing differ from path-based routing?
Host-based routing uses the hostname (like example.com) to route traffic, while path-based routing uses the URL path (like /app1 or /app2) to decide where to send traffic.
Click to reveal answer
beginner
What is a simple example of an Ingress rule for host-based routing?
An Ingress rule that sends traffic for host 'app.example.com' to service 'app-service' on port 80.
Click to reveal answer
beginner
Why is host-based routing useful in real life?
It lets you run multiple websites or apps on one server or IP address, saving resources and making management easier.
Click to reveal answer
Which Kubernetes resource is primarily used to implement host-based routing?
✗ Incorrect
Ingress defines rules for routing external traffic based on hostnames or paths.
Host-based routing directs traffic based on which part of the request?
✗ Incorrect
Host-based routing uses the hostname in the URL to decide where to send traffic.
What happens if no host rule matches in an Ingress configuration?
✗ Incorrect
Ingress can have a default backend to handle unmatched requests.
Which of these is NOT a benefit of host-based routing?
✗ Incorrect
Routing by URL path is path-based routing, not host-based.
In an Ingress rule, where do you specify the hostname for routing?
✗ Incorrect
The hostname is set under spec.rules.host in the Ingress YAML.
Explain how host-based routing works in Kubernetes and why it is useful.
Think about how websites use domain names to decide where to send visitors.
You got /4 concepts.
Describe the difference between host-based routing and path-based routing in Kubernetes Ingress.
Consider what part of the URL each routing method uses.
You got /4 concepts.