↓ Skip to main content
Kubernetes

PV, PVC

·1 min

PV and PVC: PersistentVolume and PersistentVolumeClaim
#

PV - Defines the structure for provisioning storage for use. They have a defined lifecycle, independent of any individual Pod that uses the PV.

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

A related concept of Storage Classes - describes the profile of the type of storage. Each storage class contains

  • provisioner
  • parameter
  • reclaimPolicy

Once the name and other parameters of a storage class are defined while creating the objects, it cannot be updated once they are created.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: esdatadir
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

PVC - Defines the structure for using the provisioned storage.

A PersistentVolumeClaim (PVC) is a request for storage by a user.

References
#

Author
Samarthya
Engineer, learner, tinkerer. This is my trophy shelf of everyday work and leisure.

Related

Kubectl - A revisit

·3 mins
It is always fun learning and trying out some new tech. In this blog, I will try and capture my experience of running my first pod using kubectl. If you wish to learn how to install a typical master, worker cluster of K8S I recommend going through this blog.

Docker

Usually I use Centos, but this time I wanted to try out docker swarm and ubuntu was the preferred option due to the options and supporting blogs available. Do read – https://docs.docker.com/get-started/#containers-and-virtual-machines docker.com