Checkpoints
A new Kubernetes cluster exists in a specific zone
/ 25
An application image with a v1 tag has been pushed to the gcr.io repository
/ 25
Check that an application has been deployed to the cluster
/ 25
Test that a service exists that responds to requests like Echo-app
/ 25
Build and Deploy a Docker Image to a Kubernetes Cluster: Challenge Lab
GSP304
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 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?
Challenge scenario
Your development team is interested in adopting a containerized microservices approach to application architecture. You need to test a sample application they have provided for you to make sure that it can be deployed to a Google Kubernetes container. The development group provided a simple Go application called echo-web
with a Dockerfile and the associated context that allows you to build a Docker image immediately.
Your challenge
To test the deployment, you need to download the sample application, then build the Docker container image using a tag that allows it to be stored on the Container Registry. Once the image has been built, you'll push it out to the Container Registry before you can deploy it.
With the image prepared you can then create a Kubernetes cluster, then deploy the sample application to the cluster.
echo-app
as the container repository image name, call your Kubernetes cluster echo-cluster
, create the Kubernetes cluster in echo-web
for the deployment name.
Task 1. Create a Kubernetes cluster
- Your test environment is limited in capacity, so you should limit the test Kubernetes cluster you are creating to just two
e2-standard-2
instances. You must call your clusterecho-cluster
.
Click Check my progress to verify the objective.
Task 2. Build a tagged Docker image
The sample application, including the Dockerfile and the application context files, are contained in an archive called echo-web.tar.gz
. The archive has been copied to a Cloud Storage bucket belonging to your lab project called gs://[PROJECT_ID].
- You must deploy this with a tag called
v1.
Task 3. Push the image to the Google Container Registry
- Your organization has decided that it will always use the
gcr.io
Container Registry hostname for all projects. The sample application is a simple web application that reports some data describing the configuration of the system where the application is running. It is configured to use TCP port 8000 by default.
Click Check my progress to verify the objective.
Task 4. Deploy the application to the Kubernetes cluster
- Even though the application is configured to respond to HTTP requests on port 8000, you must configure the service to respond to normal web requests on port 80. When configuring the cluster for your sample application, call your deployment
echo-web
.
Click Check my progress to verify the objective.
Click Check my progress to verify the objective.
Troubleshooting
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.
Not receiving assessment score for the last three objectives: This might just indicate that you have created your Kubernetes cluster in the different zone rather than
Congratulations!
Congratulations! In this lab, you have deployed a sample application to a Kubernetes cluster. You started by creating a Kubernetes cluster, then built a Docker image and pushed it to the Container Registry. Finally, you deployed the application to the cluster.
Google Cloud training and certification
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated March 13, 2024
Manual Last Tested March 13, 2024
Copyright 2025 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.