Google Cloud Professional Cloud Developer — Question 147
You need to deploy a new European version of a website hosted on Google Kubernetes Engine. The current and new websites must be accessed via the same HTTP(S) load balancer's external IP address, but have different domain names. What should you do?
Answer options
- A. Define a new Ingress resource with a host rule matching the new domain
- B. Modify the existing Ingress resource with a host rule matching the new domain
- C. Create a new Service of type LoadBalancer specifying the existing IP address as the loadBalancerIP
- D. Generate a new Ingress resource and specify the existing IP address as the kubernetes.io/ingress.global-static-ip-name annotation value
Correct answer: B
Explanation
The correct answer is B because modifying the existing Ingress resource allows you to add a host rule for the new domain while keeping the same external IP address. Option A suggests creating a new Ingress, which could complicate the configuration. Option C would not work as it involves creating a new service, and option D is incorrect since it does not address the requirement of modifying the existing Ingress.