hands-on lab
Deploy a Stateful Application in a Kubernetes Cluster
Difficulty: Advanced
Duration: Up to 2 hours and 45 minutes
Students: 6,740
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
Stateful applications are applications with memory of the past. Kubernetes has achieved wide adoption for deploying stateless applications. Kubernetes also provides a rich set of features for running stateful applications. Adoption of Kubernetes for stateful applications is growing and so is the list of stateful workloads that are supported by Kubernetes. In this lab, you will deploy a stateful application in a Kubernetes cluster to understand how Kubernetes supports stateful applications.
Learning Objectives
Upon completion of this lab you will be able to:
- Describe methods for deploying Kubernetes clusters in the cloud
- Explain how Kubernetes can deploy stateful applications
- Determine if it is a good idea to move a stateful application into Kubernetes
- Use Kubernetes to automatically provision persistent cloud storage volumes
- Expose Kubernetes applications via cloud load balancers
- Monitor and manage Kubernetes clusters using the Kubernetes Dashboard
Prerequisites
You should be familiar with:
- Basic Kubernetes concepts such as pods, services, and deployments
- AWS EBS volumes
- Working on the command line in Linux
Updates
July 13th, 2024 - Updated cluster to Kubernetes 1.30
May 6th, 2024 - Addressed an issue preventing the lab from setting up
June 13th, 2023 - Updated Kubernetes version
September 6th, 2022 - Updated to run Kubernetes 1.24
July 6th, 2022 - Pinned the MySQL image version for the mysql-init initContainer to resolve an issue with the hostname command not being found
April 28th, 2022 - Updated to run Kubernetes 1.21
January 3rd, 2022 - Improved the explanation of StatefulSets
May 2nd, 2021 - Updated to run Kubernetes 1.20, 80% faster startup time, and use a web terminal
December 16th, 2020 - Updated to Kubernetes 1.19, added EC2 instance connect support, added customized validation check
December 8th, 2020 - Updated instructions to address an issue preventing mysql commands from running
August 28th, 2020 - Updated the SSH instructions to reflect the new EC2 user interface
January 10th, 2019 - Added a validation lab step to check the work you perform in the lab
Environment before
Environment after
Covered topics
Lab steps
Connecting to the Kubernetes Cluster
Inspecting the Kubernetes Cluster
Deploying a Stateful Application in the Kubernetes Cluster
Working with the Stateful Application
Monitoring Your Kubernetes Cluster Using Kubernetes Dashboard