hands-on lab

Amazon EKS - Launch Kubernetes Cluster and Deploy WordPress

Difficulty: Intermediate
Duration: Up to 2 hours and 15 minutes
Students: 2,475
Rating: 4.5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Amazon EKS provides a fully managed Kubernetes control plane. Launching a fully operational EKS cluster is simple and can be accomplished in a matter of approximately 20 minutes. 

In this lab you will launch and EKS cluster with a single Worker Node attached. You will then be guided through the process of deploying a containerized version of WordPress, consisting of a frontend web server running Apache, and a backend database running MySQL. Both containers will leverage persistent volumes for storage, leveraging EBS GP2 volumes as the underlying storage mechanism. 

This lab is for anyone that is interested in managing and configuring an Amazon EKS cluster, and understanding how to deploy applications within Kubernetes.

Lab Objectives

Upon completion of this Lab, you will be able to:

  • Install and configure EKS Kubernetes command-line utilities for connecting and authenticating against an EKS cluster
  • Query and inspect AWS EC2 instances and EBS volumes
  • Update and configure Kubernetes declarative YAML files to deploy a containerized WordPress application 
  • Be able to manage and maintain Kubernetes cluster resources, such as Deployments, Pods, Services, and Secrets

Lab Prerequisites

You should be familiar with:

  • Be comfortable with SSH to remotely administer a Linux based server
  • Basic Linux administration

Lab Environment

This lab will start with the following AWS resources being provisioned automatically for you:

  • EKS Cluster
  • EKS Worker Node instance (single)
  • EKS Launcher instance
  • EKS SSH Management instance
  • EBS volumes for persistent storage 

To achieve the Lab end state, you will be walked through the process of:

  • Downloading and installing EKS Kubernetes utilities
  • Update and configure Kubernetes declarative YAML files to deploy a WordPress containerized application 
  • Deploy and maintain a containerized WordPress application using Kubernetes cluster resources, such as Deployments, Pods, Services, and Secrets using the kubectl and associated utilities
  • Confirm that the containerized WordPress application is fully operational
  • Teardown and cleanup all Kubernetes cluster resources, such as Deployments, Pods, Services, and Secrets 

Updates

October 11th, 2024 - Updated Kubernetes version

September 24, 2024 - Resolve check issue

December 5th, 2023 - Updated Kubernetes version

June 22nd, 2023 - Resolved intermittent deployment issue

February 28th, 2023 - Updated to K8s 1.24

November 7th, 2022 - Updated screenshots to match UI

December 15th, 2021 - Updated some screenshots

October 27th, 2021 - Updated Kubernetes cluster version to 1.21, added custom validation checks to validate progress through the lab

October 26th, 2021 - Migrated from client-side SSH to using EC2 instance connect

March 19th, 2021 - Updated Kubernetes cluster version to 1.19, updated some instructions and screenshots

April 22nd, 2020 - Edited the provisioning script to allow the Kubernetes node to perform needed tasks

March 16th, 2020 - Edited the provisioning script to allow the lab's EKS cluster to successfully pull needed resources

July 2nd, 2019 - Refactored part of the provisioning script to improve lab maintainability

April 11th, 2019 - Improved AWS CLI commands to work with the latest EKS node naming convention

February 20th, 2019 - Updated the EC2 launch instance role to have all the permissions required by the latest eksctl CloudFormation templates

January 10th, 2019 - Added a validation lab step to check the work you perform in the lab

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Connecting to the Virtual Machine using EC2 Instance Connect
Reviewing EKS Resources Automatically Created
Installing Kubernetes Management Tools and Utilities
Preparing K8s Wordpress YAML Files
Creating MySQL Database Password
Performing MySQL Database Deployment
Performing Wordpress Web Application Deployment
Testing the Wordpress Application from End-to-End
Tearing Down and Cleaning Up EKS Resources