Kubernetes 101 – Storage – DEV Community

Another essential aspect of Kubernetes is storage. In some instances, you’ll want to use some sort of storage solution.

Because our pods can spool up again, die and regenerate on the fly, we can’t rely on them to store elements.

In many cases, we want to store some data, but stay there and access that data across multiple pods.

Kubernetes has a wide variety of storage options. Let’s take a closer look at them.

versions

Volumes are the basic storage entities in Kubernetes. It can provide all types of storage depending on your cloud provider and needs. Access to these storage volumes can be achieved through persistent volumes.

For example, Azure Cloud’s implementation will be similar to that of Google and AWS.

CSI – Container Storage Interface

This interface is used to store containers. It is a plugin that makes it easy for us to manage storage containers.

non-persistent storage

This is the default storage option for Kubernetes, which includes non-permanent temporary storage. As long as the character lives, it will be there, but as soon as it dies and stops, it is wiped out.

constant volume

For consecutive volumes, we have two important concepts to understand.

Constant Volume (PV)

It is a storage element in the cluster, defined either manually or by a storage class (a way of defining the type of a volume). The life cycle of a PV storage is separate from that of your other pods and implements its layer to communicate with your desired storage.

Persistent Volume Claim (PVC)

This is the user’s storage request. An application can request a specific type of storage, for example, how to interact with the data. Or how big should be the storage and what should be the level of performance.
These assertions are independent of your underlying implementation (hence vendor-independent).

conclusion

The storage within Kubernetes is very vast and dynamic.
We are independent of our final storage solution and can wrap around these implementations.

It gives us a lot of flexibility and freedom.
Apart from this freedom, we also get various storage options depending on our needs.

Thanks for reading, and let’s join!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter

Leave a Comment