Soru

Zorluk: ZorDeploying Cloud Load Balancers and Configuring Cloud DNS

You are tasked with deploying a Global External Application Load Balancer in Google Cloud using the `gcloud` CLI to route HTTP traffic to an existing unmanaged instance group `web-ig-us` in `us-central1`. To ensure dependencies are created before their dependent resources, what is the correct sequential order of `gcloud` commands required to provision this infrastructure from the backend up to the global frontend forwarding rule?

  1. 1Create a global HTTP health check to monitor the health of the backend instances (`gcloud compute health-checks create http ...`).
  2. 2Create a global backend service specifying HTTP protocol and associating the health check (`gcloud compute backend-services create ...`).
  3. 3Add the unmanaged instance group `web-ig-us` as a backend to the backend service (`gcloud compute backend-services add-backend ...`).
  4. 4Create a URL map that routes default incoming requests to the backend service (`gcloud compute url-maps create ...`).
  5. 5Create a target HTTP proxy that references the URL map (`gcloud compute target-http-proxies create ...`).
  6. 6Create a global forwarding rule that binds an external IP address and port 80 to the target HTTP proxy (`gcloud compute forwarding-rules create ...`).

Cevap

The correct order of deployment commands from backend dependencies to frontend entry point is: 1) Create global HTTP health check, 2) Create global backend service with health check, 3) Add instance group backend to backend service, 4) Create URL map referencing default backend service, 5) Create target HTTP proxy referencing URL map, and 6) Create global forwarding rule pointing to target proxy.
Deploying a GCP Global External Application Load Balancer via the command-line interface requires a strict bottom-up dependency ordering. First, independent health checks must be provisioned (`gcloud compute health-checks create http`). Second, the global backend service must be created referencing the health check (`gcloud compute backend-services create`). Third, workload backends are added to the service (`gcloud compute backend-services add-backend`). Fourth, the URL map is created to route requests to the backend service (`gcloud compute url-maps create`). Fifth, the target proxy is created referencing the URL map (`gcloud compute target-http-proxies create`). Finally, the global forwarding rule is created pointing public traffic on port 80 to the target HTTP proxy (`gcloud compute forwarding-rules create`).

Adım Adım Çözüm

1
Identify resource dependencies for Global External Application Load Balancers
Lower-level components (health checks, backend services) must exist before higher-level routing objects (URL maps, proxies, forwarding rules).
Google Cloud resource creation calls validate referenced resource URIs; creating dependent resources before their targets results in command failure.
2
Order backend foundation deployment
Health check is created first, followed by the backend service linked to that health check, followed by adding the instance group.
Backend services cannot be created without referencing a health check, and backends cannot be added until the backend service container exists.
3
Order frontend routing deployment
URL map points to backend service -> Target Proxy points to URL map -> Forwarding Rule points to Target Proxy.
Each traffic handling layer encapsulates the layer beneath it, culminating in the global forwarding rule receiving incoming requests.

Anahtar Kavram

Bottom-up CLI deployment ordering for GCP Global External Application Load Balancers
Bu soruyu puanla