This project represents my comprehensive exploration of Kubernetes storage management, focusing on implementing and mastering persistent storage solutions. Through hands-on development with Persistent Volumes (PV) and Persistent Volume Claims (PVC), I've created a practical guide for handling stateful applications in Kubernetes. This repository demonstrates real-world implementation patterns and best practices for maintaining data persistence in containerized environments.
- Master Kubernetes storage architecture and implementation
- Develop expertise in PV and PVC management
- Implement various storage access modes and policies
- Create production-ready storage solutions
- Document comprehensive storage management patterns
- Build practical examples for real-world scenarios
Kubernetes Storage Architecture: Shows the relationship between Persistent Volumes (PV), Persistent Volume Claims (PVC), and Volume Snapshots in a cluster, demonstrating how storage components interact from Administrator provisioning to Developer usage.
- Platform:
- Kubernetes 1.21+
- Container Runtime Interface (CRI)
- Container Storage Interface (CSI)
- Storage:
- Persistent Volumes (PV)
- Persistent Volume Claims (PVC)
- StorageClasses
- Dynamic Provisioners
- Development Environment:
- Ubuntu 20.04 LTS
- VS Code with Kubernetes extensions
- Docker CE
- Monitoring & Management:
- kubectl
- Kubernetes Dashboard
- Storage metrics
- Version Control: Git
🐳 Prerequisites
- Kubernetes cluster (v1.21 or higher)
- kubectl command-line tool
- Access to cluster storage resources
- Basic understanding of Kubernetes concepts
- Git for version control
- VS Code or similar text editor
- Docker installed and configured
- Storage backend (local or cloud provider)
⚙️ Installation
-
Clone the repository:
git clone https://github.com/TheToriqul/k8s-persistent-volumes.git
-
Navigate to the project directory:
cd k8s-persistent-volumes
-
Create storage directories:
sudo mkdir -p /data/db sudo chmod 777 /data/db
-
Verify cluster access:
kubectl cluster-info kubectl get nodes
-
Set up storage classes:
kubectl apply -f storage-class/
🎮 Usage
-
Create a persistent volume:
kubectl apply -f manifests/pv.yaml
-
Create a persistent volume claim:
kubectl apply -f manifests/pvc.yaml
-
Deploy a stateful application:
kubectl apply -f manifests/statefulset.yaml
-
Verify the deployment:
kubectl get pv,pvc,pods
For detailed commands and explanations, refer to the reference-commands.md file.
- Implementation of storage solutions in Kubernetes
- Understanding of storage access modes and policies
- Expertise in storage lifecycle management
- Proficiency in storage troubleshooting
- Advanced knowledge of volume provisioning
- Cloud-native storage architecture design
- Best practices in storage management
- Systematic problem-solving approach
- Technical documentation skills
- Infrastructure planning
View Planned Improvements
- Implement dynamic volume provisioning
- Add cloud provider integrations
- Create automated backup solutions
- Develop storage monitoring system
- Implement disaster recovery
- Add performance benchmarking
Contributions are welcome! Feel free to:
- 📧 Email: toriqul.int@gmail.com
- 📱 Phone: +65 8936 7705, +8801765 939006
- 🌐 LinkedIn: @TheToriqul
- 🐙 GitHub: @TheToriqul
- 🌍 Portfolio: TheToriqul.com
Let's connect and discuss cloud-native technologies!
- Poridhi for providing comprehensive labs and inspiring this project
- The Kubernetes community for excellent documentation
- Fellow developers who provided valuable feedback
- Open source contributors who inspire continuous learning
Thank you for exploring this repository! I hope you find it valuable for understanding Kubernetes storage management. Happy learning! 🚀