DEV Community

Cover image for Kubernetes Volumes
Hamza Nasir
Hamza Nasir

Posted on

Kubernetes Volumes

While studying Kubernetes, I found the section on Volumes a bit confusing. As it is crucial, I delved into it and simplified it as much as possible. I want to share the following concepts and hope it will be helpful for others learning about Kubernetes as well.

๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—ฉ๐—ผ๐—น๐˜‚๐—บ๐—ฒ ๐—ถ๐—ป ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€?
At its core, a volume is a directory, possibly with some data in it, which is accessible to the containers in a pod. Multiple types of volumes can be used. i.e. (AWS-EBS, Azure Disk).

๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—ฆ๐˜๐—ผ๐—ฟ๐—ด๐—ฎ๐—–๐—Ÿ๐—ฎ๐˜€๐˜€?
StorageClass in Kubernetes is a blueprint that tells the system how to provide storage for your applications automatically. It simplifies the process by managing the type and creation of storage behind the scenes.

๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—ฃ๐—ฒ๐—ฟ๐˜€๐—ถ๐˜€๐˜๐—ฒ๐—ป๐˜ ๐—ฉ๐—ผ๐—น๐˜‚๐—บ๐—ฒ?
Persistent volume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. It is a resource in the cluster just like a node is a cluster resource.

๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—ฎ ๐—ฃ๐—ฒ๐—ฟ๐˜€๐—ถ๐˜€๐˜๐—ฒ๐—ป๐˜ ๐—ฉ๐—ผ๐—น๐˜‚๐—บ๐—ฒ ๐—–๐—น๐—ฎ๐—ถ๐—บ?
A PersistentVolumeClaim (PVC) is a request for storage by a user. It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g., they can be mounted ReadWriteOnce, ReadOnlyMany, ReadWriteMany, or ReadWriteOncePod, see AccessModes)

Top comments (0)