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?
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
Single Load Balancer with Multiple Host Rules:
In Google Kubernetes Engine, you can configure a single Ingress resource with multiple host rules that route traffic based on different domain names. This allows you to use the same load balancer but handle traffic differently depending on the domain.
By modifying the existing Ingress resource to include a host rule for the new domain, the same load balancer IP can be used to serve both the current website and the new European version.
Host Rule Matching:
Host rules in the Ingress resource enable domain-based routing, where traffic is directed to the correct service based on the requested domain. This is ideal for scenarios like yours where you need to serve multiple websites under the same load balancer but different domain names.
A. New Ingress resource: Defining a new Ingress resource with a host rule would create a second Ingress resource, which could lead to conflicts or issues since you want to use the same external IP. The existing Ingress should be modified instead.
C. New Service with LoadBalancer type: This would create a new load balancer, which goes against the requirement to use the same external IP. Also, setting the loadBalancerIP does not achieve domain-based routing.
D. New Ingress resource with static IP: While this allows you to assign an existing static IP, it's unnecessary if you're already using the same load balancer. Modifying the existing Ingress with additional host rules is more efficient and aligns with the goal.
Right answer is B. Existing Ingress resource needs to be updated to add new domain for the new service that runs within the cluster of worker nodes. It looks like this:
User ---> HTTP(S) Load balance IP --------> Domain 1 -----> Older version of application.
--------> Domain 2 -----> New version of application.
Based on the requirements and the references
https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting
https://cloud.google.com/kubernetes-engine/docs/tutorials/configuring-domain-name-static-ip
B. You should modify the existing Ingress resource with a host rule matching the new domain. This will allow you to route traffic to the new website while still using the same IP address and load balancer. This approach allows you to use name-based virtual hosting, which supports routing HTTP traffic to multiple host names at the same IP address. It also enables you to reuse the existing IP address and load balancer, which means that the existing website and the new website can be accessed through the same IP address while having different domain names.
B is the answer.
https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting
Name-based virtual hosts support routing HTTP traffic to multiple host names at the same IP address.
"must be accessed via the same HTTP(S) load balancer's external IP address" means re-use the existing ingress resource
upvoted 3 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
thewalker
2 months, 2 weeks agothewalker
2 months, 2 weeks ago__rajan__
1 year, 2 months agopurushi
1 year, 3 months agoomermahgoub
1 year, 10 months agozellck
1 year, 11 months agogardislan18
1 year, 11 months agokisswd
1 year, 11 months ago