From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Accessing storage through Pod volumes

Accessing storage through Pod volumes

- The easiest way to use storage is by using Pod Volumes. So Pod Volumes are a part of the Pod specification and they have the storage reference hard coded in the Pod manifest. That's not bad, but it doesn't allow for very flexible storage allocation. Pod Volumes can be used for many storage types. Also, the ConfigMap can be mounted as a Pod Volume, so ConfigMap is just another Pod Volume type. Let me show you a quick example that demonstrates how to work with Pod Volumes. The example is in a file, morevolumes.yaml. And what do we see in this file? We see... Let's start at the bottom. That is using the volume test of the type emptyDir. emptyDir, in fact, is an ephemeral storage. It lives as long as the Pod is alive and it mainly serves for providing temporary shared storage between multiple containers within the same Pod. That's exactly what we see here. So I'm learning two containers that have a volume mount of name test. Name test refers to this volume on the mount path, which is…

Contents