Bird
0
0

You want to route traffic so that requests to '/app' go to 'app-service' and requests to '/app/api' go to 'api-service'. How should you order the paths in the Ingress rule?

hard📝 Workflow Q8 of 15
Kubernetes - Ingress
You want to route traffic so that requests to '/app' go to 'app-service' and requests to '/app/api' go to 'api-service'. How should you order the paths in the Ingress rule?
APlace '/app/api' path before '/app' path
BPlace '/app' path before '/app/api' path
COrder does not matter in Ingress paths
DCombine both paths into one rule
Step-by-Step Solution
Solution:
  1. Step 1: Understand path matching priority

    Ingress matches paths in order; more specific paths must come first to avoid being shadowed.
  2. Step 2: Apply to '/app/api' and '/app'

    Place '/app/api' before '/app' so requests to '/app/api' match the correct service.
  3. Final Answer:

    Place '/app/api' path before '/app' path -> Option A
  4. Quick Check:

    More specific paths first in Ingress rules [OK]
Quick Trick: List more specific paths before general ones [OK]
Common Mistakes:
  • Placing general path before specific
  • Assuming order does not matter
  • Trying to combine paths incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes