web-instance-template with a Debian imageweb-mig in the us-central1-a zone using the instance template with 2 instancesweb-lb that balances traffic to the managed instance groupweb-instance-template with a Debian imageweb-mig in the us-central1-a zone using the instance template with 2 instancesweb-lb that balances traffic to the managed instance groupweb-instance-template using the Debian 11 image from the debian-cloud project.Use gcloud compute instance-templates create with --image-family=debian-11 and --image-project=debian-cloud.
web-mig in zone us-central1-a using the instance template web-instance-template with 2 instances.Use gcloud compute instance-groups managed create with --size 2, --template web-instance-template, and --zone us-central1-a.
web-health-check and a backend service named web-backend-service that uses the health check and points to the managed instance group web-mig in zone us-central1-a.Create a health check with gcloud compute health-checks create http web-health-check --port 80. Then create a backend service with gcloud compute backend-services create web-backend-service --protocol HTTP --health-checks web-health-check --global. Finally, add the instance group as backend with gcloud compute backend-services add-backend.
web-url-map, a target HTTP proxy named web-http-proxy, and a global forwarding rule named web-lb that listens on port 80 and forwards traffic to the backend service web-backend-service.Create URL map: gcloud compute url-maps create web-url-map --default-service web-backend-service --global
Create target proxy: gcloud compute target-http-proxies create web-http-proxy --url-map web-url-map --global
Create forwarding rule: gcloud compute forwarding-rules create web-lb --global --ports=80 --target-http-proxy web-http-proxy.