Overview of Accessing the Google Cloud Console and Cloud Shell Qwiklab
In this lab, you become familiar with the Google Cloud web-based interface. Two integrated environments are available:
- A GUI environment called the Google Cloud Console
- A command-line interface called Cloud Shell, which has the commands from the Cloud SDK pre-installed
In this course, you use both environments.
You need to know a few things about the Google Cloud Console:
- The Google Cloud Console is under continuous development, so the graphical layout occasionally changes. Often, these changes are made to accommodate new Google Cloud features or changes in the technology, resulting in a slightly different workflow.
- You can perform most common Google Cloud actions in the Google Cloud Console. Sometimes new features are implemented in the Cloud SDK before they are made available in the Google Cloud Console.
- The Google Cloud Console is extremely fast for some activities. The Google Cloud Console can perform multiple actions on your behalf that might require many command-line actions.
- The commands in the Cloud SDK are valuable tools for automation.
In this lab, you learn how to perform the following tasks:
- Learn how to access the Google Cloud Console and Cloud Shell
- Become familiar with the Google Cloud Console
- Become familiar with Cloud Shell features, including the Cloud Shell code editor
- Use the Google Cloud Console and Cloud Shell to create buckets and VMs and service accounts
- Perform other commands in Cloud Shell
Navigate to Google Cloud Storage and create a bucket
Cloud Storage allows worldwide storage and retrieval of any amount of data at any time. You can use Cloud Storage for a range of scenarios including serving website content, storing data for archival and disaster recovery, or distributing large data objects to users via direct download.
Cloud Storage buckets must have a globally unique name. In your organization, you should follow Google Cloud’s recommended best practices for naming buckets. For this lab, we can easily get a unique name for our bucket by using the ID of the Google Cloud project that Qwiklabs created for us because Google Cloud project IDs are also globally unique.
- In the Google Cloud Console, on the Navigation menu, click Home .
- In the Dashboard tab of the resulting screen, the Project info section shows your Google Cloud project ID. Select and copy the project ID. Because this project ID was created for you by Qwiklabs, it will resemble qwiklabs-gcp- followed by a long hexadecimal number.
- In the Google Cloud Console, on the Navigation menu, click Cloud Storage > Browser.
- Click Create bucket.
- For Name, paste in the Google Cloud project ID string you copied in an earlier step. These lab instructions will later refer to the name that you typed as [BUCKET_NAME].
- Click Continue.
- Click on Choose how to control access to objects and uncheck Enforce public access prevention on this bucket, now select Fine-grained.
- Click Continue.
- Leave all other values as their defaults.
- Click Create.
Create a virtual machine (VM) instance
Google Compute Engine offers virtual machines running in Google’s data centers and on its network as a service. Google Kubernetes Engine makes use of Compute Engine as a component of its architecture. For this reason, it’s helpful to learn a bit about Compute Engine before learning about Kubernetes Engine.
- On the Navigation menu, click Compute Engine > VM instances.
- Click Create Instance.
- For Name, type
first-vmas the name for your instance.
- For Region, select us-central1.
- For Zone, select us-central1-c.
- For Machine type, examine the options.
The Machine type: menu lists the number of virtual CPUs, the amount of memory, and a symbolic name such as e1-standard-1. The symbolic name is the parameter you use to select the machine type when using the
gcloud command to create a VM. To the right of the region, zone, and machine type is a per-month estimated cost.
- To see the breakdown of estimated costs, click Details to the right of the Machine type list underneath the estimated costs.
- For Machine type, click 2 vCPUs (e2-standard-2).
How did the cost change?
- For Machine type, click e2-micro (2 shared vCPU).
The micro type is a shared-core VM that is inexpensive.
- For Firewall, click Allow HTTP traffic.
- Leave the remaining settings as their defaults, and click Create.
Wait until the new VM is created.
Explore the VM details
- On the VM instances page, click the name of your VM,
- Locate CPU platform, notice the value, and click Edit.
You can’t change the machine type, the CPU platform, or the zone of a running Google Cloud VM. You can add network tags and allow specific network traffic from the internet through firewalls.
Some properties of a VM are integral to the VM and are established when the VM is created. They cannot be changed. Other properties can be edited. For example, you can add disks, and you can determine whether the boot disk is deleted when the instance is deleted.
- Scroll down and examine Availability policies.
Compute Engine offers preemptible VM instances, which cost less per hour but can be terminated by Google Cloud at any time. These preemptible instances can save you a lot of money, but you must make sure that your workloads are suitable to be interrupted. You can’t convert a non-preemptible instance into a preemptible one. This choice must be made at VM creation.
If a VM is stopped for any reason (for example, an outage or a hardware failure), the automatic restart feature starts it back up. Is this the behavior you want? Are your applications idempotent (written to handle a second startup properly)?
During host maintenance, the VM is set for live migration. However, you can have the VM terminated instead of migrated.
If you make changes, they can sometimes take several minutes to be implemented, especially if they involve networking changes, like adding firewalls or changing the external IP.
- Click Cancel.
Create an IAM service account
An IAM service account is a special type of Google account that belongs to an application or a virtual machine, instead of to an individual end-user.
- On the Navigation menu, click IAM & admin > Service accounts.
- Click + Create service account.
- On the Service account details page, specify the Service account name as
- Click Create and Continue.
- On the Grant this service account access to project page, specify the role as Project > Editor.
- Click Continue.
- Click Done.
- On the Service accounts page, move to the extreme right of the
test-service-accountand click on the three dots.
- Click Manage keys.
- Click ADD KEY
- Select Create new key
- Select JSON as the key type.
- Click Create.
A JSON key file is downloaded. In a later step, you find this key file and upload it to the VM.
- Click Close.
Congratulations! You’re done with Kubernetes Engine Qwik Start.
Complete More Qwiklabs:
Get Google Cloud Stickers: Get it Now