Challenge 4: Scale the Application to Handle Increased Traffic

Previous Challenge Next Challenge

Introduction

Now that you have a running instance of your app in GKE and exposed it to the internet, your website has become extremely popular. You need a way to scale your app to multiple instances so that you can handle the traffic. In this challenge we’ll learn how to scale your application to up to 3, and then 5 replicas to meet the demand.

Description

Using kubectl, issue a command to scale your deployment from 1 to 3 instances. Confirm that new Pods were created by looking at all resources.

Although we can issue kubectl commands like the above to scale our deployment, it is better practice to do this declaratively. Update your Deployment yaml file and change it to deploy 5 instances.

Apply the new yaml file and confirm that new Pods were created by looking at all resources.

Success Criteria

  • Show your coach that you’ve started with 1 instance
  • Show your coach that you’ve scaled to 3 instances by using a kubectl command
  • Show your coach that you’ve scaled to 5 instances by modifying your Deployment yaml file

Previous Challenge Next Challenge