Create the Cloud Load Balancer on Google Cloud as described in Introduction to the Load Balancer, in the following order.
The client is able to communicate with the VM instances which are detected as healthy by the health check by connecting to the load balancer frontend IP address.
Create an Instance Group
Create the following two instance groups.
Instance Group List
- From the Navigation menu, select Compute Engine > Instance groups.
- Click CREATE INSTANCE GROUP and select New unmanaged instance group from the left pane.
- Enter the name for the instance group and select the region and zone. Select the Network and Subnetwork. Select the primary node under the VM instance and click Create.
- Repeat the steps to create the instance group on the secondary node.
- The instance groups have been created.
Create the Load Balancer
- From the Navigation menu, Select Network services > Load balancing.
- Click CREATE LOAD BALANCER and select TCP Load Balancing > Start configuration.
- Under Internet facing or internal only, select Only between my VMs. Set Multiple regions or single region to Single region only and click Continue.
- Enter the name for the new load balancer name (”lk-lb”) and click Backend configuration.
- Select the region and network and add the created two instance groups for the backend.
Under the Health checks, click Create a Health check. Enter the name and set TCP for Protocol and enter “12345” in the Port field. Click Save and continue.
- Select Frontend configuration. Enter the name for the frontend.
Subnetwork: Public Subnet.
IP address: Ephemeral(custom)
Purpose of Internal IP: Non-shared
Select Single for Ports and enter the port number. Click Done.
|Purpose||IP address||Custom ephemeral IP address||Number|
- The load balancer has been created.