0
0
Kubernetesdevops~5 mins

Host-based routing in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AService
BIngress
CPod
DConfigMap
Host-based routing directs traffic based on which part of the request?
AURL path
BIP address
CHostname
DHTTP method
What happens if no host rule matches in an Ingress configuration?
AIngress controller crashes
BTraffic is dropped
CTraffic is routed randomly
DTraffic is routed to a default backend if configured
Which of these is NOT a benefit of host-based routing?
ARoute traffic by URL path
BSave IP addresses
CServe multiple apps on one IP
DSimplify DNS management
In an Ingress rule, where do you specify the hostname for routing?
Aspec.rules.host
Bmetadata.name
Cspec.backend.serviceName
Dspec.tls.hosts
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.