Quick Reference for GCP Cloud Shell
Cloud Shell Quick Start - Google Cloud Platform
Set the default Project
you can use compute/region
and compute/zone
to specify the zone or region
create an image with a start up script for Apache.
Create an Unmanaged instance group
Create an HTTP health check
Create a managed instance group
When creating managed instance groups we are utilizing the the image template created for the managed instance group. you can create an image template before creating an managed instance group or while created the managed instance group.
gcloud compute --project "your project name here" instance-groups managed create "instance-group-autoscale" --region "us-east1" --base-instance-name "instance-group-autoscale" --template "instance-template-1" --size "1"
Regional groups are recommended over zonal groups
With regional groups your workloads are spread across multiple zones from the same region. Static external IP addresses are considered regional resources while persistent disk and instances are considered zonal.
Zonal groups - Spans instances across the same zone. zonal resources can only be used by other resources in the same zone.
Working with machine types
When using cloud shell we can see the available machine types using this command.when using this command all available machine types will be listed, bur what if we wanted to see only the first 5?
let’s get only the first 5 machine types from that list
custom machine types When creating a custom machine type memory must be in increments of 256 MB 1vCPU would need at least 1GB of memory, if your using a shared 1vCPU then the 0.6 GB would work but only under that configuration.
you can add extended memory to custom machine types. Predefined machine types are not supported, an instance can have up to 6.5 GB memory per 1vCPU.
Last updated