Your application is deployed in a Google Kubernetes Engine (GKE) cluster. You want to expose this application publicly behind a Cloud Load Balancing HTTP(S) load balancer.
What should you do?
Your application is deployed in a Google Kubernetes Engine (GKE) cluster. You want to expose this application publicly behind a Cloud Load Balancing HTTP(S) load balancer.
What should you do?
To expose your application publicly behind a Cloud Load Balancing HTTP(S) load balancer in a Google Kubernetes Engine (GKE) cluster, you should configure a GKE Ingress resource. An Ingress resource defines rules for routing external HTTP(S) traffic to internal services, allowing more sophisticated routing (like URL-based routing) compared to a simple Service with type: LoadBalancer. When you create an Ingress object, GKE's Ingress controller automatically provisions and configures a Cloud HTTP(S) Load Balancer.
A(https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer)
an ingress works if you already have a service, like an https load balancer or a NodePort.
For me the right answer is D. The Ingress Object create a global http(s) L.B. The advantage of having a layer 7 load balancer is that we can configure advanced things at network layer 7. For example to route traffic based on the path of the request and so on. In the question it seems that is not needed, so for me a Load Balancer Service is ok since it creates a network load balancer (TCP/UDP) that is ok for HTTP or HTTPS exposing (since we can configure any TCP/UDP port to be exposed to The Internet)
A) The important part of the question is this "...expose this application publicly behind a Cloud Load Balancing HTTP(S) load balancer." This means it is an L7 exposure using HTTPS (a Service of type "LoadBalancer" would only create an L4 exposure - IP only... No HTTPS). So Ingress is the choice you should make. And in GKE, luckily this is one thing - create an ingress and the LB will be attached automagically ;D
The correct answer is D Configuring a GKE ingress resource is not enough, you also need to expose the service with the type NodePort and then configure the ingress resource to point to that service. D is sufficient, then D is the correct answer. A lacks some more work.
(D) is not correct as service with type LoadBalancer create network load balancer not http load balancer. (A) is correct ingress will create http balancer without the need of specify type https://cloud.google.com/kubernetes-engine/docs/concepts/ingress#overview
To expose your application publicly behind a Cloud Load Balancing HTTP(S) load balancer in a Google Kubernetes Engine (GKE) cluster, we should configure a GKE Ingress resource. This approach allows you to define rules for routing external HTTP(S) traffic to internal services based on hostnames and URL paths.
answer is D
To expose your application publicly behind a Cloud Load Balancing HTTP(S) load balancer in a GKE cluster, you should configure a GKE Ingress resource or a GKE Service resource with type: LoadBalancer. To configure a GKE Ingress resource, you need to define rules for routing HTTP(S) traffic to the application in the cluster. This is done by creating an Ingress object, which is associated with one or more Service objects, each of which is associated with a set of Pods. The GKE Ingress controller will then create a Google Cloud HTTP(S) Load Balancer and configure it according to the information in the Ingress and its associated Services. Alternatively, you can configure a GKE Service resource with type: LoadBalancer to expose your application publicly. This will create a Cloud Load Balancing HTTP(S) load balancer and associate it with the Service. The Service will then route traffic to the application Pods.
A is correct
I think it's D. They need a Load Balancer too. Ingress just permits to expose a cluster, then A answer is not complete according to requirement.
It's A... 'Cos Kind: Ingress create automatically a LB HTTP(S)
kind Service in GKE creates TCP/IP LB. If you want to leverage HTTP(s) you need to create Ingress class.
https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer: "When you specify kind: Service with type: LoadBalancer in the resource manifest, GKE creates a Service of type LoadBalancer" D is correct
Changing my answer to A https://cloud.google.com/kubernetes-engine/docs/concepts/ingress: "In GKE, an Ingress object defines rules for routing HTTP(S) traffic to applications running in a cluster. An Ingress object is associated with one or more Service objects, each of which is associated with a set of Pods. To learn more about how Ingress exposes applications using Services, see Service networking overview. When you create an Ingress object, the GKE Ingress controller creates a Google Cloud HTTP(S) Load Balancer and configures it according to the information in the Ingress and its associated Services."
The correct answer is A. Configure a GKE Ingress resource. Here's why: Ingress for External Load Balancing: Ingress is the Kubernetes resource specifically designed for managing external HTTP(S) traffic to services within your cluster. When you create an Ingress resource, GKE automatically provisions and configures a Cloud Load Balancing HTTP(S) load balancer to route traffic to your application.
Let's break down why the other options are incorrect: B. Configure a GKE Service resource: Services in Kubernetes are used to expose applications within the cluster. While you can create a Service of type LoadBalancer , this will create an internal load balancer within the cluster, not an external one. C. Configure a GKE Ingress resource with type: LoadBalancer: Ingress resources don't have a type field. The LoadBalancer type is used for Services, not Ingress. D. Configure a GKE Service resource with type: LoadBalancer: This would create an internal load balancer within the cluster, not an external one.
A. Configure a GKE Ingress resource. This option correctly configures the Ingress resource which is designed to expose HTTP and HTTPS routes from outside the cluster to services within the cluster. B. Configure a GKE Service resource. This option only exposes the application internally within the cluster unless the service type is specified as LoadBalancer. C. Configure a GKE Ingress resource with type: LoadBalancer. This option is incorrect because Ingress resources do not have a type: LoadBalancer property. The Ingress resource itself manages the creation of a load balancer. D. Configure a GKE Service resource with type: LoadBalancer. This option creates a TCP/UDP load balancer, not an HTTP(S) load balancer, which does not meet the requirements for an HTTP(S) load balancer.
You want to expose this application publicly behind a Cloud Load Balancing HTTP(S) load balancer. Hence using Service with type LoadBalancer
https://cloud.google.com/kubernetes-engine/docs/concepts/ingress GKE Ingress for HTTP(S) Load Balancing This page provides a general overview of what Ingress for HTTP(S) Load Balancing is and how it works. Google Kubernetes Engine (GKE) provides a built-in and managed Ingress controller called GKE Ingress. This controller implements Ingress resources as Google Cloud load balancers for HTTP(S) workloads in GKE.