Loading...
No results found.

Apply your skills in Google Cloud console

Google Cloud Storage and Containers for AWS Professionals

Get access to 700+ labs and courses

Deploying Google Kubernetes Engine (AWS)

Lab 1 hour universal_currency_alt 5 Credits show_chart Introductory
info This lab may incorporate AI tools to support your learning.
Get access to 700+ labs and courses

You have recently been hired by a telecommunication enterprise using Google Cloud as its principal cloud services provider. As a cloud compute specialist, you are instructed to research and adopt the Google Kubernetes Engine (GKE) services offered by Google Cloud.

Some of your concerns surround the following aspects of the project include the following:

  • Cluster management
  • Administration tools for Kubernetes
  • Verifications processes

Since you have been working with Amazon Web Services (AWS) at your previous employer, you know how the Elastic Kubernetes Service (EKS) is used to orchestrate containers. To deploy EKS, you made use of various tools including the following:

  • AWS Management Console, which corresponds to the Google Cloud Console
  • AWS Command-line interface (AWS CLI)

You defined and provisioned the cluster according to business needs and in the background, EKS provisioned the necessary number of nodes corresponding to the server instances that ran your containers.

An example of how your Kubernetes architecture worked is as follows:

AWS Diagram

Overview

In this lab, you use the Google Cloud Console to build GKE clusters and deploy a sample Pod.

Objectives

In this lab, you learn how to perform the following tasks:

  • Use the Google Cloud Console to build and manipulate GKE clusters
  • Use the Google Cloud Console to deploy a Pod
  • Use the Google Cloud Console to examine the cluster and Pods

Lab setup

For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.

  1. Sign in to Qwiklabs using an incognito window.

  2. Note the lab's access time (for example, 1:15:00), and make sure you can finish within that time.
    There is no pause feature. You can restart if needed, but you have to start at the beginning.

  3. When ready, click Start lab.

  4. Note your lab credentials (Username and Password). You will use them to sign in to the Google Cloud Console.

  5. Click Open Google Console.

  6. Click Use another account and copy/paste credentials for this lab into the prompts.
    If you use other credentials, you'll receive errors or incur charges.

  7. Accept the terms and skip the recovery resource page.

After you complete the initial sign-in steps, the project dashboard opens.

Task 1. Deploy GKE clusters

In this task, you use the Google Cloud Console and Cloud Shell to deploy GKE clusters.

Use the Google Cloud Console to deploy a GKE cluster

  1. In the Google Cloud Console, on the Navigation menu (Navigation menu icon), click Kubernetes Engine > Clusters.

  2. Click Create to begin creating a GKE cluster. Click SWITCH TO STANDARD CLUSTER.

  3. Again click to SWITCH TO STANDARD CLUSTER.

  4. Examine the console UI and the controls to change the cluster name, the cluster location, Kubernetes version, the number of nodes, and the node resources such as the machine type in the default node pool.

Clusters can be created across a region or in a single zone. A single zone is the default. When you deploy across a region the nodes are deployed to three separate zones and the total number of nodes deployed will be three times higher.

  1. Change the cluster name to standard-cluster-1.

  2. Select Zonal as Location type and choose zone to us-central1-a. Leave all the values at their defaults and click Create.

The cluster begins provisioning.

Note: You need to wait a few minutes for the cluster deployment to complete.

When provisioning is complete, the Kubernetes Engine > Clusters page looks like the screenshot:

Clusters page

Click Check my progress to verify the objective. Deploy GKE cluster

  1. Click the cluster name standard-cluster-1 to view the cluster details
  2. You can scroll down the page to view more details.
  3. Click the Storage and Nodes tabs under the cluster name (standard-cluster-1) at the top to view more of the cluster details.

Task 2. Modify GKE clusters

It is easy to modify many of the parameters of existing clusters using either the Google Cloud Console or Cloud Shell. In this task, you use the Google Cloud Console to modify the size of GKE clusters.

  1. In the Google Cloud Console, on the Navigation menu (Navigation menu icon), click Kubernetes Engine > Clusters > standard-cluster-1, click NODES at the top of the details page.
  2. In Node Pools section, click default-pool.
  3. In the Google Cloud Console, click RESIZE at the top of the Node Pool Details page.
  4. Change the number of nodes from 3 to 4 and click RESIZE.

Resize button on the Node Pool Details page

  1. In the Google Cloud Console, on the Navigation menu (Navigation menu icon), click Kubernetes Engine > Clusters.

When the operation completes, the Kubernetes Engine > Clusters page should show that standard-cluster-1 now has four nodes.

Click Check my progress to verify the objective. Modify GKE clusters

Task 3. Deploy a sample workload

In this task, using the Google Cloud console you will deploy a Pod running the nginx web server as a sample workload.

  1. In the Google Cloud Console, on the Navigation menu(Navigation menu icon), click Kubernetes Engine > Workloads.
  2. Click Deploy to show the Create a deployment wizard.
  3. Change the Deployment name to nginx-1.
  4. Click NEXT: CONTAINER DETAILS and accept the default container image, nginx:latest, which deploys 3 Pods each with a single container running the latest version of nginx.
  5. Scroll to the bottom of the window and click the Deploy button leaving the Configuration details at the defaults.
  6. When the deployment completes your screen will refresh to show the details of your new nginx deployment.

Click Check my progress to verify the objective. Deploy a sample nginx workload

Task 4. View details about workloads in the Google Cloud Console

In this task, you view details of your GKE workloads directly in the Google Cloud Console.

  1. In the Google Cloud Console, on the Navigation menu (Navigation menu icon), click Kubernetes Engine > Workloads.
  2. In the Google Cloud Console, on the Kubernetes Engine > Workloads page, click nginx-1.

This displays the overview information for the workload showing details like resource utilization charts, links to logs, and details of the Pods associated with this workload.

  1. In the Google Cloud Console, click the Details tab for the nginx-1 workload. The Details tab shows more details about the workload including the Pod specification, number and status of Pod replicas and details about the horizontal Pod autoscaler.

  2. Click the Revision History tab. This displays a list of the revisions that have been made to this workload.

  3. Click the Events tab. This tab lists events associated with this workload.

  4. And then the YAML tab. This tab provides the complete YAML file that defines these components and full configuration of this sample workload.

  5. Still in the Google Cloud Console's Details tab for the nginx-1 workload, click the Overview tab, scroll down to the Managed Pods section and click the name of one of the Pods to view the details page for that Pod.

  6. The Pod details page provides information on the Pod configuration and resource utilization and the node where the Pod is running.

  7. In the Pod details page, you can click the Events and Logs tabs to view event details and links to container logs in Cloud Operations.

  8. Click the YAML tab to view the detailed YAML file for the Pod configuration.

Summary

In this lab, you explored the Kubernetes functionality within GKE to create clusters that you can fully configure and manage. Also, you learned how to modify the cluster and deploy a simple workload. Here is a recap of some of the key similarities and differences between GKE and EKS:

Similarities:

  • EKS and GKE are both managed Kubernetes services that allow customers to deploy, manage, and scale containerized applications in the cloud.
  • Both Google Cloud and AWS offer the Kubernetes service as a Platform as a Service (PaaS).
  • Both GKE and EKS apply the same principles for containers and deployments to populate a cluster.

Differences:

  • In EKS, the worker nodes are provisioned using Amazon Elastic Compute Cloud (EC2) instances, which are managed by the Amazon EKS control plane. In GKE, the worker nodes are provisioned using Google Compute Engine (GCE) instances, which are managed by the GKE control plane.
  • In EKS, the worker nodes are created using Amazon Machine Images (AMIs) that are preconfigured with the necessary Kubernetes components and settings. In GKE, the worker nodes are created using Google's Container-Optimized OS, which is also preconfigured with the necessary Kubernetes components and settings.
  • In EKS, the worker nodes are managed using the AWS Management Console, AWS CLI, or third-party tools. In GKE, the worker nodes are managed using the Google Cloud Console, gcloud CLI, or third-party tools.
  • Currently GKE offers up to 5,000 nodes in a cluster, while in EKS the number of nodes allowed in a cluster is 4,500.

End your lab

When you have completed your lab, click End Lab. Google Cloud Skills Boost removes the resources you’ve used and cleans the account for you.

You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.

The number of stars indicates the following:

  • 1 star = Very dissatisfied
  • 2 stars = Dissatisfied
  • 3 stars = Neutral
  • 4 stars = Satisfied
  • 5 stars = Very satisfied

You can close the dialog box if you don't want to provide feedback.

For feedback, suggestions, or corrections, please use the Support tab.

Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

Previous Next

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

This content is not currently available

We will notify you via email when it becomes available

Great!

We will contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.
Preview