Lab Steps

lock
Signing In to the Google Cloud Console
lock
Defining an Instance Group for the Compute Engine Instances
lock
Allowing Traffic to the Compute Engine Instances
lock
Creating a Load Balancer for the Instance Group
lock
Testing the Functionality of the Load Balancer
Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.

Introduction

Now that the instance group has been created, you need to create a load balancer to handle the traffic to the instances inside the group. In this lab, you will create a load balancer attached to the instance group.

 

Instructions

1. In the upper search bar, enter load balancing. Click on Load balancing:

alt

 

2. Click on CREATE LOAD BALANCER on the displayed blade:

alt

 

3. Because your servers are hosting a sample website, you will create an HTTP load balancer. Click on START CONFIGURATION on the HTTP(s) Load Balancing card:

alt

 

4. You want to allow and handle the traffic from the internet, so leave the From Internet to my VMs or serverless services option selected, select Global HTTP(S) Load Balancer (classic), and click CONTINUE:

alt

 

5. Enter ca-lab-load-balancer as the load balancer's name.

 

6. Under Frontend configuration,  enter ca-lab-frontend-configuration as the Name:

alt

Note: The frontend is the way the load balancer exposes itself. So, in this case it is exposed using an IP address, and it gets HTTP requests made on port 80.

 

7. Click DONE.

 

8. Click Backend configuration, click the Backend services & backend buckets drop-down, and click CREATE A BACKEND SERVICE:

alt

 

7. Fill the displayed form as described below (leave the unmentioned fields at their default value):

  • Name: ca-lab-backend-service
  • Instance group: Select ca-lab-instance-group
  • Port numbers: 80
  • Cloud CDN: Uncheck Enable Cloud CDN
  • Health check: CREATE A HEALTH CHECK
    • Enter ca-lab-health-check as Name and click SAVE.
  • Logging: Ensure Enable logging is unchecked
  • Click CREATE.

alt

alt

Note: The backend service represents the GCP resources where the load balancer is going to direct the traffic to. So, in this case, the backend service is the instance group you created earlier.

 

8. Click on CREATE.

 

9. After a few seconds, you will see the load balancer ready:

alt

Warning: If the spinner doesn't complete, click on the Refresh button.

 

Summary

In this lab, you created a load balancer attached to the instance group.

Validation checks
1Checks
Created the Load Balancer

Check that the load balancer has been created.

Cloud Load Balancing