Two GKE applications are exposed via an external Application Load Balancer. Requests to /sales and /get-an-analysis work, but requests to the base hostname return 404. How do you fix this?
Choose an answer
Tap an option to check your answer.
Correct answer: Edit the Ingress manifest: define the default backend and reapply the Ingress YAML..
Why this is the answer
The correct solution is to edit the Ingress manifest to define a default backend. An Ingress resource routes external HTTP/S traffic to services within a cluster. When specific path rules (like /sales and /get-an-analysis) are defined, but no rule covers the base path, requests to the base hostname will not match any rule and typically result in a 404. Defining a defaultBackend in the Ingress manifest specifies a Service to handle all requests that don't match any other defined rules, thus resolving the 404 error for the base hostname. Editing the Service manifest is incorrect because Services primarily handle internal load balancing and exposure of pods, not external HTTP/S routing rules or default backend definitions for an Application Load Balancer. Adding a path rule for in either the Service or Ingress manifest is not the standard or correct way to define a catch-all or default route; the defaultBackend field in Ingress is designed for this purpose.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed