Scale Out and Update a Containerized Application on a Kubernetes Cluster: Challenge Lab - GSP305

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
No comments yet. Be the first to comment.
Quick and practical tips to help users optimize tasks, improve skills, and solve common problems effectively across various areas like tech, lifestyle, productivity, and more.
Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary OpenAI giảm mạnh giá GPT-5.6 Luna và Terra, đồng thời chuyển Priority

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary GitHub Copilot code review đã hỗ trợ chính thức Agent Skills và MCP s

Overview Vibe coding is an emerging software development practice that uses artificial intelligence (AI) to generate functional code from natural language prompts, accelerating development, and making

Overview This lab demonstrates how Gemini can interpret what is in an image and provide a description quickly. During the exercise, you will provide the following image as input and ask Gemini is: "Wh

Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
This lab is recommended for students preparing for the Google Cloud Certified Professional Cloud Architect certification exam. Are you up for the challenge?
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. The cluster will be deployed in the us-east4-b zone.
Before you get started, in the Navigation menu, select Cloud Storage.
Verify the echo-web-v2.tar.gz file is in the gs://qwiklabs-gcp-02-910c0269608a bucket.
Next, you will check to make sure your GKE cluster has been created before continuing.
Continue when you see a green checkmark next to echo-cluster:
gcloud container clusters get-credentials echo-cluster --zone=us-east4-b
kubectl create deployment echo-web --image=gcr.io/qwiklabs-resources/echo-app:v1
kubectl expose deployment echo-web --type=LoadBalancer --port 80 --target-port 8000
You need to update the running echo-app application in the echo-web deployment from the v1 to the v2 code you have been provided. You must also scale out the application to 2 instances and confirm that they are all running.
The updated sample application, including the Dockerfile and the application context files, are contained in an archive called echo-web-v2.tar.gz. The archive has been copied to a Cloud Storage bucket in your lab project called gs://qwiklabs-gcp-02-910c0269608a. V2 of the application adds a version number to the output of the application. In this task, you will download the archive, build the Docker image, and tag it with the v2 tag.
Your organization uses the Container Registry to host Docker images for deployments, and uses the gcr.io Container Registry hostname for all projects. You must push the updated image to the Container Registry before deploying it.
Click Check my progress to verify the objective.
Check that there is a tagged image in gcr.io for echo-app:v2.
Check my progress
In this task, you will deploy the updated application to the Kubernetes cluster. The deployment should be named echo-web and the application should be exposed on port 80. The application should be accessible from outside the cluster.
Click Check my progress to verify the objective.
Deploy the updated application version (v2) to the Kubernetes cluster.
Check my progress
In this task, you will need to scale out the application to 2 replicas.
Click Check my progress to verify the objective.
Scale out the kubernetes application so that it is running 2 replicas.
Check my progress
In this task, you will need to confirm that the application is running and responding correctly. You can use the external IP address of the application to test it.
Click Check my progress to verify the objective.
Verify your deployed application service is responding correctly.
Check my progress
Receiving a 504, Gateway timeout error: This might just indicate that the application hasn't quite initialized yet, but it could also be caused by a mismatch between the default port that is set in the Dockerfile (TCP port 8000) and:
The choice of application port you configured when deploying the application image, or
When you configured external access.
export ZONE=

curl -LO raw.githubusercontent.com/QUICK-GCP-LAB/2-Minutes-Labs-Solutions/main/Scale%20Out%20and%20Update%20a%20Containerized%20Application%20on%20a%20Kubernetes%20Cluster%20Challenge%20Lab/gsp305.sh
sudo chmod +x gsp305.sh
./gsp305.sh