web servers attached on front end of HTTP(s) Load Balancer

I am very new to the google cloud platform. How do I make sure to attach webservers to the front end of a HTTP(s) load balancer, from the gcloud console?

When finishing a challenge qwiklab on the google cloud platform, I run into this problem - the grader is hinting that I should have connected my webservers to the frontend of a HTTP(s) load balancer (I know how to create both), but I do not know how to do it.

I am supernew to cloud engineering, so it's quite possible this is the wrong place to post this question - if so, please feel free to direct me to the right forum.


To have an open picture about that, an HTTP(S) load balancer has 3 parts:

  1. Backend configuration: A backend service directs incoming traffic to an instance group. You can also use a storage bucket to serve content.
  2. Host and path rules: Host and path rules determine how your traffic will be directed. If you don't specify any rules, traffic will be sent to the default backend service.
  3. Frontend configuration: Your IP address, protocol and port. This is the IP to which your client requests will come in to.

The Frontend is pretty much associated with the Forwarding Rules. Each forwarding rule references an IP address and one or more ports on which the load balancer accepts traffic. Some Google Cloud load balancers limit you to a predefined set of ports, and others let you specify arbitrary ports. The forwarding rule also specifies an IP protocol. For Google Cloud load balancers, the IP protocol is always either TCP or UDP.

I understand that you’ve created backend services but they are not attached to a frontend, so I suggest you follow those steps: At the Console Menu -> Network Services -> Load balancing, you will see a list of created LB services. If at least an HTTP map was created with your backend service, it will be listed in the Load Balancers tab, so you can edit it (clicking over the name and then on the Edit button at the top of the page). Otherwise you will need to create the LB clicking on the button “Create Load Balancer”. Once in the Edit view, it will have the “Frontend configuration”. Click on that, and after on the “Add Frontend IP and Port”. There you will be able to define an Ephemeral IP address (IPv4 or IPv6) or creating a new IP (as your preference), then set the protocol (HTTP/HTTPS) and port (80, 8080 or 443) depending with service you will be using. For the use of HTTPS protocol, it will be necessary to create or use an existing TLS/SSL certificate. Click in Done and Update the configuration to take effect.

I hope this information is useful for you.

For more information you can consult the official documentation at https://cloud.google.com/load-balancing/docs/https


for a direct How-To: https://cloud.google.com/load-balancing/docs/https/ext-http-lb-simple

It is generally recommended to understand the various concepts of loadbalancers in GCP. Overview: https://cloud.google.com/load-balancing/docs/https