GCP Backend services provide configuration information to the load balancer.
Load balancers use the information in a backend service to direct incoming traffic to one or more attached backends.
The backend consists of a pool of VMs and a health check that is used to verify that the VMs are operational.
Login to Google Cloud Console
Click Activate Cloud Shell
to open Cloud Shell.
Create a health check with following command
Successful execution of command should produce output as below
gcloud compute health-checks create tcp test-health-chk \
Create backend service for Internal load balancer with following command
- Name of the service : test-int-lb
- load-balancing-scheme : internal
- region : us-central1
- health-checks : test-health-chk
You should see below output on successful command execution
gcloud compute backend-services create test-int-lb \
--load-balancing-scheme internal \
--region us-central1 \
--health-checks test-health-chk \
NAME BACKENDS PROTOCOL