You want to configure an Ingress controller to route HTTP traffic to two different backend services based on the URL path: traffic to '/api' should go to 'api-service', and all other traffic should go to 'web-service'. How should you define this routing logic in the Ingress resource spec?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Define multiple path entries under the 'paths' list in the Ingress rules

Ingress routing rules support path-based routing. You specify a list of paths (e.g., path: /api, path: /) under the HTTP rules, mapping each path to its respective backend service ...

Real Exam ScenarioKubernetes Networking

You want to configure an Ingress controller to route HTTP traffic to two different backend services based on the URL path: traffic to '/api' should go to 'api-service', and all other traffic should go to 'web-service'. How should you define this routing logic in the Ingress resource spec?

✓ Correct Answer & ExplanationKubernetes Networking

Correct Answer

Define multiple path entries under the 'paths' list in the Ingress rules

Why This Answer Is Correct

Ingress routing rules support path-based routing. You specify a list of paths (e.g., path: /api, path: /) under the HTTP rules, mapping each path to its respective backend service and port.

📚 What This Question Tests

This question evaluates your knowledge of Kubernetes Networking — a core concept tested in cloud certification exams. Understanding Kubernetes Networking is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.