‹ All CKAD questions

CKAD Practice Question 9: Ingress Path Routing

Certified Kubernetes Application Developer (CKAD) · Test 1 · question 9 of 10

Services and Networkingeasy

Three HTTP applications must be reachable from outside the cluster under a single hostname (shop.example.com/catalog, /cart, and /checkout) terminating TLS once, and consuming only one external IP address. An ingress controller is already running in the cluster.

Which configuration should you use?

Select one answer
Show answer and explanation

Answer:

  • B. An Ingress with a path rule per application, each rule routing to that application's own ClusterIP Service

Ingress is the HTTP-aware layer: a single Ingress object holds a rule for shop.example.com with three paths, each backend.service pointing at the ClusterIP Service in front of one application. The ingress controller fronts all of them with one address and terminates TLS from a Secret named in spec.tls, which is exactly the set of constraints given.

Option A gives each application a distinct high-numbered port on every node, so clients would use three different host:port combinations rather than one hostname with paths, and NodePort does no path routing or TLS termination.

Option C provisions three external IPs (and, on a cloud provider, three load balancers), directly contradicting the single-address requirement, and it still cannot route by URL path.

Option D would not distinguish the applications at all. A Service load-balances across every Pod its selector matches, so a request for /cart could land on a catalog Pod. Services operate at L4 and have no notion of a URL path.

Reference: Ingress

Practice Test 1 ›

Study guides for CKAD