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)