Topic 1 Question 185
Your team deployed two applications in GKE that are exposed through an external Application Load Balancer. When queries are sent to www.mountkirkgames.com/sales and www.mountkirkgames.com/get-an-analysis, the correct pages are displayed. However, you have received complaints that www.mountkirkgames.com yields a 404 error. You need to resolve this error. What should you do?
Review the Service YAML file. Add a new path rule for the * character that directs to the base service. Reapply the YAML.
Review the Ingress YAML file. Add a new path rule for the * character that directs to the base service. Reapply the YAML.
Review the Ingress YAML file. Define the default backend. Reapply the YAML.
Review the Service YAML file. Define a default backend. Reapply the YAML.
ユーザの投票
コメント(1)
- 正解だと思う選択肢: C
Explanation: The issue here is that requests to www.mountkirkgames.com (without a path) are returning a 404 error, while requests to specific paths like /sales and /get-an-analysis work fine. This suggests that the Ingress does not have a default backend defined to handle requests that do not match a specific path rule.
Why Option C is Correct? Ingress controllers in GKE route traffic based on path rules. If a request does not match any defined path, it is sent to the default backend. A missing default backend results in a 404 error for unmatched requests, which is exactly what is happening here. Solution: Update the Ingress YAML to define a default backend that will handle requests for www.mountkirkgames.com when no specific path is provided.
👍 1RKS_20212025/02/24
シャッフルモード