An outward look at the file systems and volumes available to your app.
This lab walks through many ways your application can read and write to various filesystems and volumes on Kubernetes. Some developers have the notion that apps running in a container can only have ephemeral data because once the container goes away, so does all of its data. That is true if the files you write to are not mounted to external volumes. Sometimes that ephemeral file storage is a welcomed feature, sometimes it’s vital the files stores are persisted, backed-up and encrypted at rest. No matter what your file storage requirements are, we will explore the spectrum of the techniques to connect your application to various volume types.
This lab starts with your application reading and writing to its local file system in the container. Then we look at storage in the Pod, then at the Node, then to other Pods and finally to external file stores. We start at the inner layer of your application onion and work our way out.
In this lab, you will learn how to:
☐ Inspect file system inside a container
☐ Mount a volume to a ConfigMap
☐ Mount to the Pod file system
☐ Mount to emptyDir with initContainers
☐ Mount to a Node filesystem
☐ Mount to a Persistent Volume
Volumes, filesystems, and mounts are a complex topic. The length of this lab reflects this rich topic. You’ll need some dedicated time to complete all the steps. Each step is a different topic and independent of the other topics. If you wish to skip a topic or have to come back to this lab later, each step can be explored separately to fit your busy schedule.
31 Dec, 2021