Skip to content

A collection of Kubernetes manifests demonstrating StatefulSets, persistent storage, and dynamic provisioning using NFS — ideal for DevOps practice and learning real-world infrastructure setups.

License

Notifications You must be signed in to change notification settings

Coding4Deep/kubernetes-tut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Docker kubectl kubeadm Minikube KIND Amazon EKS Helm Argo CD Prometheus Grafana Calico

Kubernetes projects & tutorial

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.

🚀 Overview

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.

🛠️ Technologies Used

  • 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.

📚 Getting Started

To get started with the projects in this repository:

  1. Clone the repository:

    git clone https://github.com/Coding4Deep/kubernetes.git
    cd kubernetes
  2. Navigate to the desired directory (e.g., volumes/) and apply the Kubernetes configurations:

    kubectl apply -f .
  3. Follow the specific instructions in each directory's README file for detailed setup and usage.

🔍 Usage Examples

Deploying a MongoDB StatefulSet with Persistent Storage

  1. Navigate to the volumes/ directory:

    cd volumes/
  2. Apply the StatefulSet and service configurations:

    kubectl apply -f mongo-statefulset.yaml
    kubectl apply -f mongo-service.yaml
  3. Verify the deployment:

    kubectl get pods -l app=mongo
    kubectl get pvc
  4. Access the MongoDB shell:

    kubectl exec -it mongo-set-0 -- mongo

Setting Up an NFS Provisioner

  1. Navigate to the volumes/ directory:

    cd volumes/
  2. Apply the NFS provisioner configurations:

    kubectl apply -f nfs-provisioner.yaml
  3. Verify the deployment:

    kubectl get pods -l app=nfs-provisioner
    kubectl get storageclass
  4. Create a PersistentVolumeClaim using the NFS provisioner:

    kubectl apply -f pvc-nfs.yaml

📄 Documentation

For detailed instructions and explanations, refer to the following documents:

🧹 Cleanup

To remove the deployed resources:

  1. Delete the StatefulSet and service:

    kubectl delete -f mongo-statefulset.yaml
    kubectl delete -f mongo-service.yaml
  2. Delete the NFS provisioner:

    kubectl delete -f nfs-provisioner.yaml
  3. Delete the PersistentVolumeClaim:

    kubectl delete -f pvc-nfs.yaml

🤝 Contributing

Contributions are welcome! If you have improvements, bug fixes, or new examples to add, please fork the repository and submit a pull request.

📄 License

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.

About

A collection of Kubernetes manifests demonstrating StatefulSets, persistent storage, and dynamic provisioning using NFS — ideal for DevOps practice and learning real-world infrastructure setups.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published