Challenge 7 - Data Volumes

< Previous Challenge

Introduction

When working with cloud native applications, the ideal location for persisting data is in SaaS Database or object/blob storage. However, that isn’t always possible, and some applications need to access local file storage. Kubernetes uses Persistent Volumes and Persistent Volume Claims to manage volumes mounted inside running containers.

A Kubernetes persistent volume represents storage that has been provisioned for use with Kubernetes pods. A persistent volume can be used by one or many pods, and can be dynamically or statically provisioned.

Persistent Volumes have different Access Modes which define how they can be utilitzed.

The storage solution options for AKS are:

The Kubernetes concepts for storage are:

We will also look at scaling in this exercise. Kubernetes has several declarative constructs for managing replicas of an application:

Architecture

The architecture for the sample pod is:

AKS Volumes

Sub-Challenge 1: Static provisioning with Azure Disks

In this sub-challenge, we will provision an Azure Disk and attach it to your pods for persistence.

Description

Success Criteria

Hints

Sub-challenge 2: Dynamic provisioning with Azure Disks

Most of the time, we have no interest in manually configuring storage for our application. In this challenge, we will use Persistent Volumes Claims to automatically provision storage.

Description

Success Criteria

Hints

Sub-Challenge 3: Scaling persistent applications with Azure Disks

In this sub-challenge, we will learn how to scale an application where each instance of the application requires separate storage.

Description

Success Criteria

Hints

Sub-Challenge 4: Scaling persistent applications with Azure Files

In the last sub-challenge, the application required separate storage per pod. In this sub-challenge, we will learn how to scale an application where all pods share the same storage.

Description

Success Criteria

Hints