DevOps, Day - 36
Managing Persistent Volumes in Your Deployment

💻 Python | Docker | Jenkins | Networking | Git | Linux 💻
Passionate about leveraging technology to drive efficiency and deliver innovative solutions. Proficient in Python development, Docker containerization, Jenkins automation, computer networking, Git version control, and Linux administration. Skilled in collaborating with diverse teams to deliver high-quality software products. Proficient in AWS EC2 instance management and deployment.
Seeking new opportunities to apply my expertise and contribute to impactful projects. Let's connect and explore how we can work together!
Inter-personal Skills:
Communication, Adaptability, Emotional intelligence, Active listening, Collaboration.
Happy To Connect🔗😊
Feel free to reach me out😃@ --> vrishnishreevb531@gmail.com 📬
What are Persistent Volumes in k8s
In Kubernetes, a Persistent Volume (PV) is a piece of storage in the cluster that has been provisioned by an administrator. A Persistent Volume Claim (PVC) is a request for storage by a user. The PVC references the PV, and the PV is bound to a specific node. Read official documentation of Persistent Volumes.

Step 1: Create a Persistent Volume (PV)

Apply the PV to your cluster
kubectl apply -f pv.yml

Step 2: Create a Persistent Volume Claim (PVC)

Apply the PVC to your cluster
kubectl apply -f pvc.yml

Step 3: Update your Deployment YAML

Step 4: Apply the Updated Deployment
kubectl apply -f deployment.yml

Step 5: Verify the Persistent Volume
kubectl get pv

Step 6: To verify that the PVC is bound to the PV and that your Deployment is using it, you can check the status of Pods
kubectl get pods


Step 1: Get the name of one of your Pods
kubectl get pods -n <namespace-name>

Step 2: Access a Pod with a Shell
kubectl exec -it <pod-name> -- /bin/bash

Step 3: Access the Persistent Volume data

Thank you so much for reading
Follow me on LinkedIn to see interesting posts like this : )




