Challenge 08 - Storage

< Previous Challenge - Home - Next Challenge >

Introduction

Not all containers can be stateless. What happens when your application needs to have some persistent storage?

Description

In this challenge we will be creating Azure data disks and using the Kubernetes storage mechanism to make them available to be attached to running containers. This will give MongoDB a place to storage its data without losing it when the container is stopped and restarted.

Success Criteria

  1. Verify that speaker and session data is imported into MongoDB
  2. Verify that the data isn’t lost after you stop and restart the MongoDB pod.
  3. Verify that this new MongoDB instance and its data are used in the application.

Advanced Challenges

Discuss with your coach what would happen if the Node running the MongoDB pod were to crash or be shut down. Would Kubernetes be able to re-deploy the pod on a different node? How do availability zones play into this?