A collection of infrastructure automation projects that demonstrate modern DevOps practices using industry-standard tools for container orchestration and infrastructure as code.
- Vagrant: Tool for building and managing virtual machine environments
- VirtualBox: Hypervisor for running virtual machines
- K3s: Lightweight Kubernetes distribution by Rancher (perfect for development and edge computing)
- Kubernetes: Container orchestration platform
- Docker: Container runtime (used by K3s)
- NGINX Ingress Controller: For managing external access to services
- Debian Bookworm: Linux distribution used for all VMs
- Purpose: Demonstrate a minimal production-like Kubernetes cluster setup
- Technologies:
- K3s (Kubernetes distribution)
- Systemd (service management)
- SSH key-based authentication
- Components:
- Server Node (mhaddaouS):
- K3s control plane components
- etcd key-value store (embedded in K3s)
- Kubernetes API server
- Worker Node (mhaddaouSW):
- K3s agent
- Container runtime (containerd)
- Server Node (mhaddaouS):
- Networking:
- Private network: 192.168.56.0/24 (VirtualBox Host-Only Network)
- Server IP: 192.168.56.110
- Worker IP: 192.168.56.111
- Flannel CNI (Container Network Interface) for pod networking
- Purpose: Showcase a complete application deployment pipeline on Kubernetes
- Technologies:
- Kubernetes Deployments
- Kubernetes Services (ClusterIP)
- Ingress NGINX Controller
- Kubernetes Secrets (for Docker Hub credentials)
- YAML configuration management
- Components:
- Single Node Cluster (alouziziS):
- K3s server with all control plane components
- Container runtime (containerd)
- Built-in service load balancer (Klipper)
- Application Stack:
- Multiple web applications containerized and deployed as separate services
- Service discovery via Kubernetes DNS
- Ingress rules for HTTP/HTTPS routing
- Configuration management using ConfigMaps and Secrets
- Single Node Cluster (alouziziS):
- Purpose: Store additional Kubernetes manifests and configurations
- Contents:
- Custom Resource Definitions (CRDs)
- Helm charts (if applicable)
- Advanced networking policies
- Storage class definitions
- RBAC configurations
- Purpose: Extra utilities and enhancements
- Contents:
- Custom scripts for cluster management
- Monitoring stack configurations (Prometheus, Grafana)
- Logging solutions (Loki, Fluentd)
- CI/CD pipeline (ArgoCD/GitLab)
- GitLab local server (for ArgoCD)
- Security hardening scripts
- VirtualBox
- Vagrant
- SSH key pair (for authentication)
cd p1
vagrant up
This will:
- Start two VMs (server and worker)
- Install K3s on the server
- Join the worker to the cluster
- Configure SSH access
cd p2
vagrant up
This will:
- Start a single VM with K3s
- Deploy multiple web applications
- Set up services and ingress
For p1:
- SSH to server:
vagrant ssh mhaddaouS
- SSH to worker:
vagrant ssh mhaddaouSW
- Check nodes:
kubectl get nodes
For p2:
- SSH to server:
vagrant ssh alouziziS
- Check deployments:
kubectl get deployments
- Check services:
kubectl get services
To stop and remove VMs:
vagrant destroy -f
- Ensure you have sufficient system resources (RAM, CPU) to run the VMs
- The project uses Debian Bookworm as the base OS
- SSH keys are automatically configured for password-less access
Project maintained by the Inception of Things team