Intro to GKE: Deploy, Scale and Update

Introduction

Running websites and applications is hard.

Things go wrong when they shouldn’t, servers crash, increase in demand causes more resources to be utilized, and making changes without downtime is complicated and stressful.

Imagine a tool that could help you do all that and even allow you to automate it! With GKE, all of that is not only possible, it’s easy! In this gHack, you assume the role of a developer running an eCommerce website for a fictional company named Fancy Store. Due to problems with scaling and outages, you’re tasked with deploying your application to GKE!

Solution Architecture

Learning Objectives

In this gHack you will experience what a cloud developer needs to go through to successfully deploy an application. You will learn to:

  • Create a GKE cluster.
  • Create a Docker container.
  • Deploy the container to GKE.
  • Expose the container via a service.
  • Scale the container to multiple replicas.
  • Modify the application.
  • Perform a zero downtime rolling update on Kubernetes

Challenges

Prerequisites

  • Your own GCP project with Owner IAM role
  • A basic understanding of Docker and Kubernetes
  • Access to an environment with the following
    • gcloud (>= 410.0.0)
    • node.js (>= v19.1.0)
    • Note Cloud Shell has these pre-installed

Contributors

  • Gino Filicetti