hands-on lab

Scaling Kubernetes Deployments Up and Down

Up to 1h 30m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.


If you're building and deploying cloud native applications and microservices, then Kubernetes is the goto container platform. Kubernetes provides superior container-orchestration, deployment, scaling, and management. Being able to deploy and scale applications within Kubernetes the right way is a skill that needs to be mastered. 

In this Lab scenario you'll work with a single container - a basic FLASK based web application. The FLASK based web application container will be based on a custom docker image that you will need to first create. 

This Lab will then teach you how to use the kubectl command to create a basic deployment of the FLASK based web application within a Kubernetes cluster. You'll learn how to use the kubectl command to expose the deployment and how to test the resulting service using the curl command. Finally, you'll learn how to use the kubectl command to manually scale up and down the deployment so that it can meet performance requirements.


Lab Objectives

Upon completion of this Lab, you will be able to:

  • Use the docker build command to build a new Docker Image and tag it with cloudacademydevops/flaskapp:latest
  • Use the kubectl command to create a custom namespace within the cluster
  • Use the kubectl command to create a deployment 
  • Use the kubectl command to scale up and down the deployment 
  • Test and validate the container setup using the curl command

You should:

  • Be comfortable with basic Linux command line administration
  • Be comfortable with basic container concepts

Lab Environment

This Lab will start with the following AWS resources provisioned automatically for you:

  • A single EC2 instance, named ide.containers.cloudacademy.platform.instance, which will have a public IP address attached. This will be the instance that you will connect to using your local workstation browser.

To achieve the Lab end state, you will be walked through the process of:

  • Using your local workstation browser to remotely connect to ide.containers.cloudacademy.platform.instance
  • Using the web based IDE and integrated terminal, you'll complete the remainder of the stated Lab Objectives (above)



August 14th, 2020 - Fixed issue preventing Kubernetes environment from starting

About the author

Jeremy Cook, opens in a new tab
Content Lead Architect
Learning paths

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Connecting to the CloudAcademy Web based Containers IDE Port 8080
Perform Build and Deployment
Expose Deployment and Test
Scale Up the Deployment
Scale Down the Deployment