A platform team hosts three HTTP microservices and wants a single external entry point that routes requests to each service by URL path, such as forwarding /orders and /users to different backends, while terminating TLS in one place. Which Kubernetes object is designed to provide this layer-7 path-based routing?
- AOne LoadBalancer Service per microservice, each provisioning its own cloud load balancer for the individual backend.
- BAn Ingress with an associated Ingress controller, which routes external HTTP traffic to Services based on host and URL path rules. Correct
- CA NodePort Service fronting all three microservices through one shared node port number opened on every cluster node.
- DA headless ClusterIP Service that returns the Pod addresses of all three microservices to callers.
Why A is wrong: LoadBalancer Services can expose each app, but they operate at layer 4 and cannot route by URL path, and using one per service defeats the single-entry-point goal.
Why B is correct: Ingress defines host and path routing rules for HTTP traffic and, with a controller, gives one entry point that fans out by path and can terminate TLS centrally.
Why C is wrong: NodePort is tempting as an external entry, but it forwards a raw port to a single Service and has no awareness of HTTP paths, so it cannot split /orders from /users.
Why D is wrong: A headless Service returns Pod IPs for direct discovery, but it stays internal and performs no path-based HTTP routing or TLS termination.