Bird
0
0

You want to route traffic so that: - '/app' goes to 'app-service' - '/app/admin' goes to 'admin-service' Which Ingress path rules correctly implement this path-based routing?

hard📝 Workflow Q15 of 15
Kubernetes - Ingress
You want to route traffic so that: - '/app' goes to 'app-service' - '/app/admin' goes to 'admin-service' Which Ingress path rules correctly implement this path-based routing?
A- path: /app/admin pathType: Prefix backend: service: name: admin-service port: number: 80 - path: /app pathType: Prefix backend: service: name: app-service port: number: 80
B- path: /app pathType: Prefix backend: service: name: app-service port: number: 80 - path: /app/admin pathType: Prefix backend: service: name: admin-service port: number: 80
C- path: /app pathType: Exact backend: service: name: app-service port: number: 80 - path: /app/admin pathType: Exact backend: service: name: admin-service port: number: 80
D- path: /app/admin pathType: Exact backend: service: name: admin-service port: number: 80 - path: /app pathType: Exact backend: service: name: app-service port: number: 80
Step-by-Step Solution
Solution:
  1. Step 1: Understand path matching order

    Ingress matches paths in order; more specific paths must come first to avoid being shadowed.
  2. Step 2: Check rule order and pathType

    Placing '/app/admin' before '/app' with pathType Prefix ensures '/app/admin' routes to admin-service, others to app-service.
  3. Final Answer:

    Place '/app/admin' rule before '/app' rule with Prefix pathType -> Option A
  4. Quick Check:

    Order specific paths first for correct routing [OK]
Quick Trick: List longer paths before shorter ones in Ingress rules [OK]
Common Mistakes:
  • Placing general path before specific path
  • Using Exact pathType causing no subpath matches
  • Ignoring rule order importance

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes