Bird
0
0

Which field in an Ingress YAML specifies the hostname for routing traffic?

easy📝 Conceptual Q2 of 15
Kubernetes - Ingress
Which field in an Ingress YAML specifies the hostname for routing traffic?
Aspec.rules.host
Bmetadata.name
Cspec.backend.serviceName
Dspec.tls.secretName
Step-by-Step Solution
Solution:
  1. Step 1: Locate hostname in Ingress spec

    The hostname is defined under spec.rules.host to route traffic based on the domain name.
  2. Step 2: Understand other fields

    metadata.name is the resource name, spec.backend.serviceName is for default backend service, and spec.tls.secretName is for TLS certificates.
  3. Final Answer:

    spec.rules.host -> Option A
  4. Quick Check:

    Hostname location = spec.rules.host [OK]
Quick Trick: Hostnames go under spec.rules.host in Ingress [OK]
Common Mistakes:
  • Using metadata.name as hostname
  • Confusing backend serviceName with host
  • Mistaking TLS secret for hostname

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes