Setup

Introduction

Ready to learn Kubernetes? You will first become familiar with Compute Engine before working through an example Guestbook application, and then move on to more advanced Kubernetes experiments.

Kubernetes is an open source project (available on kubernetes.io) which can run on many different environments, from laptops to high-availability multi-node clusters, from public clouds to on-premise deployments, from virtual machines to bare metal.

For the purpose of this codelab, using a managed environment such as Google Kubernetes Engine (a Google-hosted version of Kubernetes running on Compute Engine) will allow you to focus more on experiencing Kubernetes rather than setting up the underlying infrastructure but you should feel free to use your favorite environment instead.

Initial Setup

Log In

The instructor will provide you with a temporary username / password to login into Google Cloud Console.

Login into the Cloud Console: https://console.cloud.google.com/ with the provided credentials. In Welcome to your new account dialog, click Accept.

If you see a top bar with Sign Up for Free Trial written on it - DO NOT SIGN UP FOR THE FREE TRIAL. Click Dismiss since you'll be using a pre-provisioned lab account. If you are doing this on your own account, then you may want the free trial.

You should see just one Project - click into it.

When prompted Update to Terms of Service, select Yes and click Accept.

In the IAM & Admin page, wait for permissions to initialize (sometimes, refreshing the page speeds up the process :)

Cloud Shell

You will do most of the work from the Google Cloud Shell, a command line environment running in the Cloud. This Debian-based virtual machine is loaded with all the development tools you’ll need (docker, gcloud, kubectl and others) and offers a persistent 5GB home directory. Open the Google Cloud Shell by clicking on the icon on the top right of the screen:

When prompted, click Start Cloud Shell:

You should see the shell prompt at the bottom of the window:

Enable Boost Mode for Cloud Shell. This will provision a larger VM instance for the shell. We'll need this in order to build and push Docker container faster:

When you run gcloud on your own machine, the config settings would’ve been persisted across sessions. But in Cloud Shell, you will need to set this for every new session / reconnection.

Last updated

Was this helpful?