Scale Out and Update a Containerized Application on a Kubernetes Cluster

This article will go through the lab to Scale-Out and Update a Containerized Application on a Kubernetes Cluster. This lab is similar to Build and Deploy a Docker Image to a Kubernetes Cluster.

The challenge contains 4 required tasks.

  1. Check that there is a tagged image in gcr.io for echo-app:v2.
  2. Echo-app:v2 is running on the Kubernetes cluster.
  3. The Kubernetes cluster deployment reports 2 replicas.
  4. The application must respond to web requests with V2.0.0.

Challenge Scenario

You are taking over ownership of a test environment and have been given an updated version of a containerized test application to deploy. Your systems’ architecture team has started adopting a containerized microservice architecture. You are responsible for managing the containerized test web applications. You will first deploy the initial version of a test application, called echo-app to a Kubernetes cluster called echo-cluster in a deployment called echo-web.

Before you get started, open the navigation menu and select Cloud Storage. The last steps in the Deployment Manager script used to set up your environment create a bucket.

Refresh the Storage browser until you see your bucket. You can move on once your Console resembles the following:

Check to make sure your GKE cluster has been created before continuing. Open the navigation menu and select Kubernetes Engine > Clusters.

Continue when you see a green checkmark next to echo-cluster:

To deploy your first version of the application, run the following commands in Cloud Shell to get up and running:

1.Check that there is a tagged image in gcr.io for echo-app:v2

  • The echo-web.tar.gz file has already been copied to a Google Cloud Storage bucket called gs://[PROJECT_ID] during the lab provision. Navigate to Storage, confirm the file exists in the bucket. Then, click the file name and copy the URL of the file from its detail page.
  • Go to Cloud shell and write commands.
  • In the GCP Console go to Cloud Shell copy and paste the command.
  • It will tag image in gcr.io for echo-app:v2
  • In the GCP Console go to Cloud Shell copy and paste the command.
  • Configuration as follow:

Cluster Name: echo-cluster

Zone: us-central1-a

2. Echo-app:v2 is running on the Kubernetes cluster

  • In the GCP Console go to Cloud Shell copy and paste the command.
  • It will create an application image with a v1 tag that has been pushed to the gcr.io repository

3.The Kubernetes cluster deployment reports 2 replicas.

  • In the GCP Console go to Cloud Shell copy and paste the command.

4.The application must respond to web requests with V2.0.0

  • In the GCP Console go to Cloud Shell copy and paste the command.
  • Change the image version ‘v1’ to ‘v2’ by pressing “i”.
  • Save by esc -> Esc → “:wq”.

Congratulations! Done with the challenge lab.

If you Want to Connect with Me:

LinkedIn: https://www.linkedin.com/in/mayank-chourasia-38421a134/

Twitter: https://twitter.com/ChourasiaMayank.

Thank you Stay Safe, Stay healthy.

Stay tuned till the next blog.

Google Developers Google Cloud Qwiklabs KUBERNETS INC

I am Google Cloud Certified Associate Cloud Engineer and MS Azure Certifed. I have been working on different fields including Data Science, Sap ABAP.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store