Bird
0
0

How should you configure an Ingress resource to route traffic to service1 at /app1 and service2 at /app2 on the same domain?

hard📝 Workflow Q8 of 15
Kubernetes - Ingress
How should you configure an Ingress resource to route traffic to service1 at /app1 and service2 at /app2 on the same domain?
ACreate two Ingress resources with the same host but different paths
BDefine two separate rules under the same host, each with a distinct path and backend service
CUse a single path with a wildcard to route to both services
DExpose each service with a LoadBalancer type instead of using Ingress
Step-by-Step Solution
Solution:
  1. Step 1: Understand Ingress path routing

    Ingress supports multiple path rules under one host to route to different services.
  2. Step 2: Correct configuration

    Defining multiple paths under one host in a single Ingress resource is the standard approach.
  3. Final Answer:

    Define two separate rules under the same host, each with a distinct path and backend service -> Option B
  4. Quick Check:

    Multiple paths under one host in one Ingress [OK]
Quick Trick: Use multiple paths under one host in single Ingress [OK]
Common Mistakes:
  • Creating multiple Ingress resources with same host causing conflicts
  • Using wildcard paths that do not properly route
  • Using LoadBalancer type unnecessarily for multiple services

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes