Let's Learn Kubernetes - Basics - 3

pghildiyal

Prashant Ghildiyal

Posted on October 19, 2021

Let's Learn Kubernetes - Basics - 3

Kubernetes is a container management tool that automates the deployment, scaling, and operations of an application.
In the previous blog of 'Let's learn Kubernetes' Series, we have seen some fundamental topics such as Services, Load Balancers, ClusterIP, Nodeport, Ingress, DNS among others.

Continuing with the series, this blog is all about storage in Kubernetes. In this blog we'll give a short explanation of each concept and then post a link that explains the same in-depth.

Before diving in, it would be great if you can check out, star our repo Devtron, An End-to-End Kubernetes Software Delivery Workflow, which makes the DevOps workflow flawless for Developers, DevOps Engineers.

GitHub logo devtron-labs / devtron

Tool integration platform for Kubernetes

Storage in Kubernetes

With the rise of Kubernetes as a method for hosting microservice-based processes, data storage is always a concern. When managing containerized environments, Kubernetes storage is useful for storage administrators, because it allows them to maintain multiple forms of persistent and non-persistent data in a Kubernetes cluster.

Kubernetes Storage Illustration

At a high level kubernetes uses the following types of storages described below:

Persistent Volume & Persistent Volume Claims

A PersistentVolume (PV) is a storage resource in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.

Persistent volumes are independent of the lifecycle of the pod that uses it, meaning that even if the pod shuts down, the data in the volume is not erased.In order for a Pod to start using these volumes, it must request a volume by issuing a persistent volume claim (PVC). PVCs describe the storage capacity and characteristics a pod requires, and the cluster attempts to match the request and provision the desired persistent volume.

On the other hand, A PersistentVolumeClaim (PVC) is a request sent by a Kubernetes node for storage.The claim can include specific storage parameters required by the application—for example an amount of storage, or a specific type of access (read/write, read-only, etc.).
Kubernetes looks for a PV that meets the criteria defined in the user’s PVC, and if there is one, it matches the claim to PV. This is called binding.

Persistent Volume Illustration

To know more about them checkout these listed links:

Storage Classes

Kubernetes Storage Class Objects are specified by name in Persistent Volume Claims to provision storage with a set of properties. The storage class itself identifies the provisioner that will be used and defines that set of properties in terms the provisioner understands.
Each Storage Class contains the fields provisioner, parameters, and reclaim policy, which is used when a Persistent Volume belonging to the class needs to be dynamically provisioned.

To get a detailed view regarding Storage Classes check out the listed links:

Dynamic provisioning of Storage Classes:

Kubernetes supports dynamic volume configuration, allowing you to create storage volumes on demand. Therefore, administrators do not have to manually create new storage volumes and then create a Persistent Volume object for use in the cluster.

When the user requests a specific type of storage, the entire process runs automatically. The cluster administrator defines storage class objects as needed. Each Storage Class refers to a volume plugin, also called a provisioner.

To get a more detailed view about the topic refer to the following video:

The next blog of Let's learn Kubernetes would be the last blog of the series' Basics. If you like to learn about other significant topics in Kubernetes, you can follow the previous blogs.

💖 💪 🙅 🚩
pghildiyal
Prashant Ghildiyal

Posted on October 19, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Let's Learn Kubernetes - Basics - 4
beginners Let's Learn Kubernetes - Basics - 4

October 21, 2021

Let's Learn Kubernetes - Basics - 3
beginners Let's Learn Kubernetes - Basics - 3

October 19, 2021