This project provides a Terraform template for setting up a local Kubernetes development playground using Minikube. It automates the process of creating a local Kubernetes environment with essential components for application deployment and management.
Before you begin, ensure you have the following installed on your local machine:
This Terraform template sets up the following components in your local Minikube cluster:
- ArgoCD: Continuous Delivery tool for Kubernetes
- Ingress-NGINX: Ingress controller for Kubernetes
- Cert-Manager: Certificate management for Kubernetes
- Monitoring stack (Prometheus, Loki, and Grafana)
- Database-Service (Postgres and MongoDB)
- Minio: High Performance Object Storage tools
- Clone this repository:
git clone https://github.com/sliterentz/dev_playground.git
cd dev_playground- Initialize Terraform:
terraform init- Review and modify the
variables.tfandkubernetes.tffile to customize your setup if needed. - Apply the Terraform configuration:
terraform apply- Once the apply is complete, make sure you minikube already start
minikube start
minikube status- Now you can access your local Kubernetes playground.
- ArgoCD: Access via
https://argocd.local(default) - Grafana: Access via
https://grafana.local(default)
Note: You may need to add these domains to your /etc/hosts file pointing to your Minikube IP.
To access services using GUI tools, you can use port forwarding. Here are the commands for key services:
- ArgoCD Server:
kubectl port-forward svc/argocd-server -n argocd 8080:443Access ArgoCD UI at http://localhost:8080 2. Grafana:
kubectl port-forward svc/grafana -n monitoring 3000:80Access Grafana UI at http://localhost:3000 3. Database Services: PostgreSQL:
kubectl port-forward svc/postgres -n database 5432:5432Connect to PostgreSQL on localhost:5432 MongoDB:
kubectl port-forward svc/mongodb -n database 27017:27017Connect to MongoDB on localhost:27017 4. Minio:
kubectl port-forward svc/minio -n storage 9000:9000 9001:9001Access Minio Console at http://localhost:9001 and use port 9000 for S3 API
You can customize various aspects of the playground by modifying the variables in variables.tf. Key customizable elements include:
- ArgoCD version and configuration
- Ingress settings
- Cert-manager configuration
- Monitoring stack settings
- Your application repo
To tear down the playground and remove all resources:
terraform destroyContributions to improve this local development playground are welcome. Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.