Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Deploy a Web Application in Kubernetes with Terraform

Hey there, Gurus! Welcome to this hands-on lab. In this lab, you will first provision an EKS cluster with Terraform. Then, you will deploy an HTML5 web-based Pac-Man game that you can play in your browser to your EKS cluster with Terraform. Sounds like fun!

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Feb 24, 2023

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Deploy Your EKS Cluster with Terraform

    1. In the AWS Management Console, in the IAM service, create an access key for the AWS CLI called Terraform_Access_Key.
    2. In the terminal, configure the AWS CLI to connect to your AWS instance.
    3. Download the EKS Terraform configuration.
    4. Unzip the EKS Terraform configuration zip file.
    5. Change into the eks directory and initialize your working directory.
    6. Deploy your EKS cluster with Terraform. (Note: This can take between 10 and 15 minutes.)
    7. Configure the Kubernetes CLI to use your EKS cluster context.
    8. Confirm your cluster is up and running.
  2. Challenge

    Complete the Terraform Configuration

    1. Download the Pac-Man Terraform configuration.
    2. Unzip the Pac-Man Terraform configuration zip file.
    3. Change into the pac-man directory.
    4. Add the provided Docker image to your Pac-Man deployment configuration.
    5. Update the main Terraform configuration file to include your two modules and pass the pac-man namespace to them.
    6. Save your changes and initialize your pac-man working directory.
    7. Validate your configuration.
  3. Challenge

    Deploy the Pac-Man Web Application with Terraform

    1. Apply the Terraform configuration and deploy the web application in the pac-man namespace.
    2. Confirm that your resources were deployed and are available.
    3. In a browser, launch the application and test that it's working by playing some Pac-Man!
  4. Challenge

    Scale the Kubernetes Web Application

    1. Change the replicas in your deployment configurations to 2 backend pods and 3 frontend pods.
    2. Apply the changes to the Pac-Man web application with Terraform.
    3. Confirm the changes were successfully applied.
    4. In the browser, refresh the application and test that it is still working as expected.
    5. Scale the application back down to 1 backend pod and 1 frontend pod.
    6. Confirm the changes were successfully applied.
    7. In the browser, refresh the application again and test that it is still working as expected.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans