Kubernetes Pvc Vs Pv
The control loop within the master watches a newly created pvcs finds an identical pv if possible and binds them together.
Kubernetes pvc vs pv. When a user creates a pvc with a specific amount of storage requested and with certain access modes. We know how to manually create an ebs volume and tell kubernetes about it but what if we wanted a fully automated version of that process. Read more the importance of kubernetes in devops.
This should make the pv available. If a pv was dynamically provisioned for a new pvc the loop will always bind that pv to the pvc. You now taking the role of a developer cluster user create a persistentvolumeclaim that is automatically bound to a suitable persistentvolume.
A storageclass is a kubernetes object that stores information about creating a persistent volume for your pod. It said that kubernetes expects the admin to allocate various sized pvs beforehand. Delete the claimref entry from pv specs so as new pvc can bind to it.
When the user creates pvc to request a piece of storage kubernetes will try to match that pvc with a pre allocated pv. Re create the pvc with smaller size than pv and set volumename field of the pvc to the name of the pv. Kubernetes persistent volumes are user provisioned storage volumes assigned to a kubernetes cluster.
Here is a summary of the process. The user does not need to know the. You do not associate the volume with any pod.
Since pv has retain reclaim policy we will not lose any data when we recreate the pvc. If a match can be found the pvc will be bound to the pv and the user will start to use that pre allocated piece of storage. Kubernetes can dynamically provision volumes for an incoming claim.