Welcome to the Kubernetes repository by Coding4Deep. This collection showcases various Kubernetes configurations, deployments, and best practices aimed at simplifying container orchestration and enhancing cloud-native application management.
This repository serves as a practical resource for developers and DevOps enthusiasts looking to:
- Understand Kubernetes concepts through hands-on examples.
- Deploy and manage applications using Kubernetes resources.
- Implement persistent storage solutions like NFS provisioners.
- Scale applications efficiently within a Kubernetes cluster.
- Kubernetes: Container orchestration platform for automating application deployment, scaling, and management.
- YAML: Markup language used for configuration files.
- Docker: Platform for developing, shipping, and running applications in containers.
- NFS: Network File System for providing shared storage solutions.
To get started with the projects in this repository:
-
Clone the repository:
git clone https://github.com/Coding4Deep/kubernetes.git cd kubernetes
-
Navigate to the desired directory (e.g.,
volumes/
) and apply the Kubernetes configurations:kubectl apply -f .
-
Follow the specific instructions in each directory's README file for detailed setup and usage.
-
Navigate to the
volumes/
directory:cd volumes/
-
Apply the StatefulSet and service configurations:
kubectl apply -f mongo-statefulset.yaml kubectl apply -f mongo-service.yaml
-
Verify the deployment:
kubectl get pods -l app=mongo kubectl get pvc
-
Access the MongoDB shell:
kubectl exec -it mongo-set-0 -- mongo
-
Navigate to the
volumes/
directory:cd volumes/
-
Apply the NFS provisioner configurations:
kubectl apply -f nfs-provisioner.yaml
-
Verify the deployment:
kubectl get pods -l app=nfs-provisioner kubectl get storageclass
-
Create a PersistentVolumeClaim using the NFS provisioner:
kubectl apply -f pvc-nfs.yaml
For detailed instructions and explanations, refer to the following documents:
- NFS Provisioner Setup Guide: Step-by-step instructions for setting up the NFS provisioner in your Kubernetes cluster.
- MongoDB StatefulSet Deployment: Guide on deploying MongoDB using a StatefulSet with persistent storage.
To remove the deployed resources:
-
Delete the StatefulSet and service:
kubectl delete -f mongo-statefulset.yaml kubectl delete -f mongo-service.yaml
-
Delete the NFS provisioner:
kubectl delete -f nfs-provisioner.yaml
-
Delete the PersistentVolumeClaim:
kubectl delete -f pvc-nfs.yaml
Contributions are welcome! If you have improvements, bug fixes, or new examples to add, please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize this README.md
further to align with any additional projects or specific configurations you have in your repository.