Google Cloud

Create and Manage Cloud Resources Challenge Lab Solution

In this article i am gone to share how you can pass Create and Manage Cloud Resources Challenge Lab Solution with you.


Also visit:ย  Create ML Models with BigQuery ML Challenge Lab Solution


 

Create and Manage Cloud Resources Challenge Lab Solution

Main Task

Task 1) Create a project jumphost instance

Task 2) Create a Kubernetes service cluster

Task 3) Set up an HTTP load balancer


Follow My Steps to get 100 out of 100 score in this Qwiklabs.

Follow My Steps

  • First Activate Cloud Shell

 

Create and Manage Cloud Resources Challenge Lab Solution

Note: Run all the Given instruction in google cloud shell one by one

Step : (1)

gcloud compute instances create nucleus-jumphost
  ย  ย  ย  ย  --network nucleus-vpc
  ย  ย  ย  ย  --zone us-east1-b
  ย  ย  ย  ย  --machine-type f1-microย 
  ย  ย  ย  ย  --image-family debian-9ย 
ย  ย  ย  ย  ย  --image-project debian-cloud

Step : (2)

gcloud container clusters create nucleus-backend
  ย  ย  ย  ย  --num-nodes 1
  ย  ย  ย  ย  --network nucleus-vpc
  ย  ย  ย  ย  --region us-east1

Step : (3)

gcloud container clusters get-credentials nucleus-backend
ย  ย  ย  ย  ย  --region us-east1

Step : (4)

kubectl create deployment hello-server
--image=gcr.io/google-samples/hello-app:2.0

Step : (5)

kubectl expose deployment hello-server
  ย  ย  ย  ย  --type=LoadBalancer
  ย  ย  ย  ย  --port 8080

Step : (6)

cat << EOF > startup.sh
#! /bin/bash
apt-get update
apt-get install -y nginx
service nginx start
sed -i -- 's/nginx/Google Cloud Platform - '"$HOSTNAME"'/' /var/www/html/index.nginx-debian.html
EOF

Step : (7)

gcloud compute instance-templates create web-server-template

  ย  ย  ย  ย  --metadata-from-file startup-script=startup.sh
  ย  ย  ย  ย  --network nucleus-vpc
  ย  ย  ย  ย  --machine-type g1-small 
  ย  ย  ย  ย  --region us-east1

Step : (8)

gcloud compute instance-groups managed create web-server-group 
  ย  ย  ย  ย  --base-instance-name web-serverย 
  ย  ย  ย  ย  --size 2
  ย  ย  ย  ย  --template web-server-template
ย  ย  ย  ย  ย  --region us-east1

Step : (9)

gcloud compute firewall-rules create web-server-firewall 
  ย  ย  ย  ย  --allow tcp:80
ย  ย  ย  ย  ย  --network nucleus-vpc

Step : (10)ย 

gcloud compute http-health-checks create http-basic-check
gcloud compute instance-groups managed
  ย  ย  ย  ย  set-named-ports web-server-group
  ย  ย  ย  ย  --named-ports http:80
ย  ย  ย  ย  ย  --region us-east1

Step : (11)

gcloud compute backend-services create web-server-backend 
  ย  ย  ย  ย  --protocol HTTP
  ย  ย  ย  ย  --http-health-checks http-basic-check
  ย  ย  ย  ย  --global

Step : (12)ย 

gcloud compute backend-services add-backend web-server-backend
  ย  ย  ย  ย  --instance-group web-server-group
  ย  ย  ย  ย  --instance-group-region us-east1
ย  ย  ย  ย  ย  --global

Step : (13)

gcloud compute url-maps create web-server-map
ย  ย  ย  ย  ย  --default-service web-server-backend

Step : (14)ย 

gcloud compute target-http-proxies create http-lb-proxy 
ย  ย  ย  ย  ย  --url-map web-server-map

Step : (15)

gcloud compute forwarding-rules create http-content-rule 
  ย  ย  ย  --globalย 
  ย  ย  ย  --target-http-proxy http-lb-proxy  
  ย  ย  ย  --ports 80
gcloud compute forwarding-rules list

Once Query Execution is complete go back to qwiklabs page & Click on
Check My Progress Button try 2 or more times…

Once you get 100 points on this lab, now you can Click Button to End this lab.
Now You Successfully Clear this Qwiklabs.

Enjoy..

 


Google Cloud Platform (GCP), offered by Google,ย 

It is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as

  • Google Search
  • Gmail
  • file storage
  • YouTube

Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics and machine learning.[4] Registration requires a credit card or bank account details.


Google Cloud Platform provideย us

  • IaaS
  • PasS
  • SaaS