Scaling Kubernetes Deployments Up and Down

Lab Steps

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

Ready for the real environment experience?

DifficultyBeginner
Time Limit1h 30m
Students111
Ratings
4.4/5
starstarstarstarstar-half

Description

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)

 

Updates

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

About the Author
Students38986
Labs34
Courses93
Learning paths25

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

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

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.