Day 37 Task: Managing Persistent Volumes in Your Deployment 💥
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2bpHSLZeB3DKfOL9H_DDNLQ2nDxgf4TCQbbXpMS_0NCUsQL970uvaCqys74v7J2cYy1q4x6TZRytRTwiSOWEvG7agh1d1eg3Dbi8vjVMoaR5AkJpeMK0lu8FCF8l0F2asz5KqJ_wvbDjuTqyNjXm0y6HqUbCI2oAbwWPrMeF-cp6vFng4sDeFymYgKg/w475-h249/22550cc3-2cdf-4c1f-be11-6f2b735eb5d3.webp)
What are Persistent Volumes in k8s: In Kubernetes (k8s), a Persistent Volume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically created using a StorageClass. It is a way to decouple the storage from the Pod so that it can survive Pod rescheduling and Pod termination. A Persistent Volume can be created in a variety of ways, including network-attached storage, local storage, or cloud provider-specific storage. Once created, it can be used by a Pod via a Persistent Volume Claim (PVC), which is a request for storage resources that specifies the desired capacity and access mode. Task 1: Add a Persistent Volume to your Deployment todo app. Create a Persistent Volume using a file on your node. Template Create a Persistent Volume Claim that references the Persistent Volume. Template Update your deployment.yml file to include the Persistent Volume Claim. After Applying pv.yml pvc.yml your deployment file look like this ...