I tried to pass task 2 and task 3 many times but it didn't make sense I used the cloud shell to complete tasks those are the commands that I used
gcloud compute health-checks create http www-health-check --port 80 --request-path /
gcloud compute addresses create network-lb-ip-1 --region us-east1
gcloud compute instance-groups unmanaged create www-instance-group --zone us-east1-b
gcloud compute instance-groups unmanaged add-instances www-instance-group --instances web1,web2,web3 --zone us-east1-b
gcloud compute backend-services create www-backend-service \
--protocol HTTP \
--health-checks www-health-check \
--global
gcloud compute backend-services add-backend www-backend-service \
--instance-group www-instance-group \
--instance-group-zone us-east1-b \
--global
gcloud compute url-maps create www-url-map --default-service www-backend-service
gcloud compute forwarding-rules create www-forwarding-rule \
--address network-lb-ip-1 --global \
--target-http-proxy www-http-proxy \
--ports 80
and this give me the error
ERROR: (gcloud.compute.forwarding-rules.create) Could not fetch resource:
- The resource 'projects/qwiklabs-gcp-00-87a5a659ed9d/global/addresses/network-lb-ip-1' was not found
I tried another way using the navigation menu, but I encountered a problem with it as well !!
Solved! Go to Solution.
Either make your compute address global by using cmd
gcloud compute addresses create network-lb-ip-1 --global
or make your forwarding rule regional by using
gcloud compute forwarding-rules create www-forwarding-rule \
--region us-east1
--address network-lb-ip-1 \
--target-http-proxy www-http-proxy \
--ports 80
Since you have made your compute address regional but defined the forwarding rule globally, you are getting this error.
@reham_ashraf104 wrote:ERROR: (gcloud.compute.forwarding-rules.create) Could not fetch resource:
- The resource 'projects/qwiklabs-gcp-00-87a5a659ed9d/global/addresses/network-lb-ip-1' was not found
Either make your compute address global by using cmd
gcloud compute addresses create network-lb-ip-1 --global
or make your forwarding rule regional by using
gcloud compute forwarding-rules create www-forwarding-rule \
--region us-east1
--address network-lb-ip-1 \
--target-http-proxy www-http-proxy \
--ports 80
Since you have made your compute address regional but defined the forwarding rule globally, you are getting this error.
@reham_ashraf104 wrote:ERROR: (gcloud.compute.forwarding-rules.create) Could not fetch resource:
- The resource 'projects/qwiklabs-gcp-00-87a5a659ed9d/global/addresses/network-lb-ip-1' was not found
thanks for your help
User | Count |
---|---|
30 | |
14 | |
3 | |
2 | |
1 |