PROFESSIONAL-CLOUD-DEVELOPER · Question #160
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 h
The correct answer is B. Modify the existing Ingress resource with a host rule matching the new domain. An HTTP(S) Load Balancer on GKE is managed through an Ingress resource. To route two different domain names to two different backends via the same external IP, you add host-based routing rules to the existing Ingress. Modifying the existing Ingress (B) appends a new host rule for
Question
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?
Options
- ADefine a new Ingress resource with a host rule matching the new domain
- BModify the existing Ingress resource with a host rule matching the new domain
- CCreate a new Service of type LoadBalancer specifying the existing IP address as the
- DGenerate a new Ingress resource and specify the existing IP address as the
How the community answered
(56 responses)- A5% (3)
- B71% (40)
- C9% (5)
- D14% (8)
Explanation
An HTTP(S) Load Balancer on GKE is managed through an Ingress resource. To route two different domain names to two different backends via the same external IP, you add host-based routing rules to the existing Ingress. Modifying the existing Ingress (B) appends a new host rule for the European domain, keeping the same load balancer and IP address. Creating a new Ingress resource (A or D) would provision a new load balancer with a new external IP, violating the requirement to use the same IP. Creating a new Service of type LoadBalancer (C) also provisions a separate external IP and does not handle hostname-based routing - that is the responsibility of Ingress, not Services.
Topics
Community Discussion
No community discussion yet for this question.