Beginners guide to Kubernetes volumes

Saiyam Pathak avatar
By Saiyam Pathak
Director of Technical Evangelism


Discover the ins-and-outs of Kubernetes volumes. Why, when and how do we use them, and what types of Kubernetes volumes are within Kubernetes?


What are Kubernetes volumes?

Hi, in this section, we'll discuss Kubernetes volumes. Kubernetes provides various volume plug-ins that can be mounted inside the container to store some data temporarily or in a persistent manner, or locally as well. The Kubernetes volumes can be divided into four sections on a very high level.

What is remote storage?

So, we have remote storage. Remote storage can be the Cloud volume plug-ins, GlusterFs, and NFS. All these can be created as remote storage. You have external storage outside of your Gluster, and your data can be saved over there. So even if the Gluster goes down, your data is still safe.

What is ephemeral storage?

Then you have some ephemeral storage. Ephemeral storage is something that the container needs when it's running. For the caching or the Secrets mounting, the ConfigMap usage, all these volumes are there as ephemeral storage, emptyDir, Secrets, ConfigMap, CSI ephemeral volumes.

What is hostPath?

Next is the hostPath that mounts the node's disk inside the container. And so, it is very much restricted inside the Gluster. If your pod is pinned up on another node where the hostPath is not there, there can be inconsistencies, but there are certain use cases for the usage of hostPath.

What is a persistent volume claim?

Next comes the most commonly used one, which is the persistent volume claim to persist the data in Kubernetes. Again, these are separate Kubernetes objects. The persistent volume claim is the volume plug-in, and what it does is it talks to persistent volume and claims that persistent volume. Persistent volume can be statically provisioned by the admin, or dynamic configuration and provisioning can be based on the storage class.


All in all, Kubernetes volume is classified on a very high-level picture, and we'll be discussing each of them separately with examples and demos. That's it for this lecture. Thank you for watching. See you in the next one.

Don't stop now, check out your next lesson