Deploy a Stateful Application in a Kubernetes Cluster

Advanced

19 students completed the lab in ~54m

Total available time: 1h:30m

Be the first to rate this lab!

Lab Overview

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.

Lab 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

Lab 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

Lab Environment

Before completing the Lab instructions, the environment will look as follows:

After completing the Lab instructions, the environment should look similar to:

Follow these steps to learn by building helpful cloud resources

Log In to the Amazon Web Services Console

Your first step to start the Lab experience

Understanding the Kubernetes Cluster Architecture

Understand the cluster architecture and the resources provisioned for this Lab

Connecting to the Virtual Machine using SSH with Agent Forwarding

Create a secure connection to a remote machine using SSH with authentication agent forwarding

Connecting to the Kubernetes Master

Connect to the Kubernetes master node by exploiting SSH agent forwarding

Deploying a Stateful Application in the Kubernetes Cluster

Deploy a replicated MySQL database in the Kubernetes Cluster

Working with the Stateful Application

Run SQL commands against MySQL, scale the cluster, and add an external load balancer

Monitoring Your Kubernetes Cluster Using Kubernetes Dashboard

Use Kubernetes Dashboard to to observe the status of your cluster