# Create and Manage Cloud Resources
**A Tour of Google Cloud Hands-on Labs**
:::success
**Insight**
1. Accessing the Cloud Console
2. Projects in the Cloud console
3. Roles and permissions
4. APIs and services
:::
---
**Creating a Virtual Machine**
:::success
**Insight**
1. Create a new instance from the Cloud console
2. Install an NGINX web server
3. Create a new instance with gcloud
:::
---
**Compute Engine: Qwik Start - Windows**
:::success
**Insight**
1. Create a virtual machine instance
2. Remote Desktop (RDP) into the Windows Server
:::
---
**Getting Started with Cloud Shell and gcloud**
:::success
**Insight**
1. Configuring your environment
2. Filtering command-line output
3. Connecting to your VM instance
4. Updating the firewall
5. Viewing the system logs
:::
---
**Kubernetes Engine: Qwik Start**
:::success
**Insight**
1. Set a default compute zone
2. Create a GKE cluster
3. Get authentication credentials for the cluster
4. Deploy an application to the cluster
5. Deleting the cluster
:::
---
**Set Up Network and HTTP Load Balancers**
:::success
**Insight**
1. Set the default region and zone for all resources
2. Create multiple web server instances
3. Configure the load balancing service
4. Sending traffic to your instances
5. Create an HTTP load balancer
6. Testing traffic sent to your instances
:::
---
**Create and Manage Cloud Resources: Challenge Lab**
:::success
**Insight**
1. Create a project jumphost instance
2. Create a Kubernetes service cluster
3. Set up an HTTP load balancer
:::
<!-- [Challenge Lab](https://bijjybox.medium.com/getting-started-create-and-manage-cloud-resources-challenge-lab-tutorial-17b8a6cf24bc) -->
> Detailed Tutorial of Task — 1
1. Compute Engine > VM instances
2. Create instance and rename it, ex: `nucleus-jumphost-836`
3. Create the instance in the correct zone, ex: `europe-west1-d`
4. Use an *e2-micro* machine type
5. Use the default image type (Debian Linux)
> Detailed Tutorial of Task — 2
1. Activate Cloud Shell
2. Create Kubernetes Service Cluster in the correct region, ex: `europe-west1-d`
3. Use the Docker container hello-app (`gcr.io/google-samples/hello-app:2.0`) as a placeholder; the team will replace the container with their own work later.
4. Expose the app on port `8082`
```
gcloud config set compute/zone europe-west1-d
gcloud container clusters create nucleus-jumphost-webserver1
gcloud container clusters get-credentials nucleus-jumphost-webserver1
kubectl create deployment hello-app --image=gcr.io/google-samples/hello-app:2.0
kubectl expose deployment hello-app --type=LoadBalancer --port 8082
kubectl get service
```
> Detailed Tutorial of Task — 3
```
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
```
1. Creating an instance template
```
gcloud compute instance-templates create nginx-template \
--metadata-from-file startup-script=startup.sh
```
2. Creating a target pool
(This command will ask you the location where you want to create the target pool. If it’s not `europe-west1`, type “n”.
Select the number corresponding to `europe-west1` in the list. In my case it was 15. Type 15 and hit Enter.)
```
gcloud compute target-pools create nginx-pool
```
3. Creating a managed instance group
```
gcloud compute instance-groups managed create nginx-group \
--base-instance-name nginx \
--size 2 \
--template nginx-template \
--target-pool nginx-pool
gcloud compute instances list
```
4. Creating a firewall rule named as `grant-tcp-rule-491` to allow traffic (80/tcp)
```
gcloud compute firewall-rules create grant-tcp-rule-491 --allow tcp:80
gcloud compute forwarding-rules create nginx-lb \
--region europe-west1 \
--ports=80 \
--target-pool nginx-pool
gcloud compute forwarding-rules list
```
5. Creating a health check
```
gcloud compute http-health-checks create http-basic-check
gcloud compute instance-groups managed \
set-named-ports nginx-group \
--named-ports http:80
```
6. Creating a backend service and attach the manged instance group
```
gcloud compute backend-services create nginx-backend \
--protocol HTTP --http-health-checks http-basic-check --global
gcloud compute backend-services add-backend nginx-backend \
--instance-group nginx-group \
--instance-group-zone europe-west1-d \
--global
```
7. Creating a URL map and target HTTP proxy to route requests to your URL map
```
gcloud compute url-maps create web-map \
--default-service nginx-backend
gcloud compute target-http-proxies create http-lb-proxy \
--url-map web-map
```
8. Creating a forwarding rule
```
gcloud compute forwarding-rules create http-content-rule \
--global \
--target-http-proxy http-lb-proxy \
--ports 80
gcloud compute forwarding-rules list
```