Skip to content

Latest commit

Β 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Local K8s Platform

A single-command local Kubernetes platform with GitOps, monitoring, and ingress β€” ready in minutes.

License: MIT K3d ArgoCD Prometheus

Clone β†’ make up β†’ Full platform running. That's it.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Your Laptop                               β”‚
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                    Docker Desktop                          β”‚  β”‚
β”‚  β”‚                                                            β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚              k3d Cluster (k3s-in-Docker)            β”‚   β”‚  β”‚
β”‚  β”‚  β”‚                                                     β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ Server  β”‚  β”‚ Agent 1 β”‚  β”‚ Agent 2 β”‚            β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜            β”‚   β”‚  β”‚
β”‚  β”‚  β”‚       β”‚            β”‚            β”‚                   β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚        NGINX Ingress Controller   β”‚             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚     (*.localhost β†’ services)      β”‚             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  └──────────────┬───────────────────-β”˜             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚                 β”‚                                   β”‚   β”‚  β”‚
β”‚  β”‚  β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚    β”‚            β”‚                    β”‚             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚    β–Ό            β–Ό                    β–Ό             β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ArgoCDβ”‚  β”‚Grafana  β”‚  β”‚ Your Apps      β”‚       β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚ (UI) β”‚  β”‚Prom/AM  β”‚  β”‚ podinfo, echo  β”‚       β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”¬β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚   β”‚  β”‚
β”‚  β”‚  β”‚     β”‚                                              β”‚   β”‚  β”‚
β”‚  β”‚  β”‚     β–Ό  GitOps (app-of-apps)                       β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚  apps/ directory         β”‚                      β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β”‚  (drop manifests here)   β”‚                      β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                      β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β”‚                                                            β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                          β”‚  β”‚
β”‚  β”‚  β”‚ k3d Registry β”‚  (local image cache)                     β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                          β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                  β”‚
β”‚  Ports: 80 (HTTP) ─────► Ingress Controller                     β”‚
β”‚         443 (HTTPS) ───► Ingress Controller                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βœ… Prerequisites

Tool Version Purpose
Docker 20.10+ Container runtime
k3d 5.x Lightweight K8s clusters
kubectl 1.27+ Kubernetes CLI
Helm 3.12+ Package manager

Don't have these? Run make prerequisites β€” it'll check and offer to install what's missing.

⚑ Quick Start

git clone https://github.com/Karthik-Chowdary/local-k8s-platform.git
cd local-k8s-platform
make up

Or with the ArgoCD Marketplace UI (browse, configure & deploy Helm charts from a web UI):

make up-marketplace

That's it. In ~5 minutes you'll have a full platform running.

🌐 What You Get

Service URL Credentials
ArgoCD http://argocd.localhost admin / make argocd-password
Grafana http://grafana.localhost admin / admin
Prometheus http://prometheus.localhost β€”
Alertmanager http://alertmanager.localhost β€”
Podinfo http://podinfo.localhost β€”
Echoserver http://echoserver.localhost β€”
Marketplace (opt-in) http://marketplace.localhost β€”

πŸ’‘ *.localhost resolves to 127.0.0.1 on most systems β€” no /etc/hosts edits needed.

πŸ“¦ What's Included

  • πŸ”„ ArgoCD β€” GitOps continuous delivery with app-of-apps pattern
  • πŸ“Š Prometheus + Grafana β€” Full monitoring stack with pre-built K8s dashboards
  • πŸšͺ NGINX Ingress β€” Production-grade ingress controller
  • 🎯 Example Apps β€” podinfo and echoserver to demonstrate the pattern
  • πŸ“ Extensible β€” Drop a YAML in apps/ to add new applications

πŸ› οΈ Makefile Targets

make up                 # Full platform setup (cluster + all apps)
make up-marketplace     # Full platform + ArgoCD Marketplace UI
make down               # Tear everything down
make status             # Show URLs, pods, ArgoCD sync status
make prerequisites      # Check/install prerequisites

make argocd-password    # Get ArgoCD admin password
make argocd-ui          # Port-forward ArgoCD (fallback if ingress fails)
make grafana-ui         # Port-forward Grafana

make add-app            # Instructions for adding a new app
make logs               # Tail important pod logs
make help               # Show all available targets

βž• Adding Your Own Apps

Adding a new app is as simple as creating one YAML file:

# apps/my-app.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: https://my-chart-repo.example.com
    targetRevision: "1.0.0"
    chart: my-app
    helm:
      valueFiles:
        - ../../helm-values/my-app.yaml
  destination:
    server: https://kubernetes.default.svc
    namespace: my-app
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Commit + push β†’ ArgoCD picks it up automatically.

πŸ“– Full guide: docs/ADDING_APPS.md

πŸ“ Repository Structure

local-k8s-platform/
β”œβ”€β”€ README.md                      # You are here
β”œβ”€β”€ Makefile                       # All automation targets
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ setup.sh                   # Full setup orchestration
β”‚   β”œβ”€β”€ teardown.sh                # Clean teardown
β”‚   └── prerequisites.sh           # Prerequisite checker/installer
β”œβ”€β”€ cluster/
β”‚   └── k3d-config.yaml            # k3d cluster configuration
β”œβ”€β”€ bootstrap/
β”‚   β”œβ”€β”€ argocd/
β”‚   β”‚   β”œβ”€β”€ namespace.yaml         # ArgoCD namespace
β”‚   β”‚   └── values.yaml            # ArgoCD Helm values
β”‚   └── app-of-apps.yaml           # Root Application (watches apps/)
β”œβ”€β”€ apps/                          # ← Drop new ArgoCD apps here
β”‚   β”œβ”€β”€ ingress-nginx.yaml         # NGINX Ingress Controller
β”‚   β”œβ”€β”€ kube-prometheus-stack.yaml # Monitoring stack
β”‚   β”œβ”€β”€ podinfo.yaml               # Example: podinfo
β”‚   └── echoserver.yaml            # Example: echoserver
β”œβ”€β”€ helm-values/                   # Helm value overrides
β”‚   β”œβ”€β”€ ingress-nginx.yaml
β”‚   β”œβ”€β”€ kube-prometheus-stack.yaml
β”‚   β”œβ”€β”€ podinfo.yaml
β”‚   └── echoserver.yaml
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ ADDING_APPS.md             # How to add apps
β”‚   β”œβ”€β”€ ARCHITECTURE.md            # Architecture deep-dive
β”‚   └── TROUBLESHOOTING.md         # Common issues & fixes
β”œβ”€β”€ .gitignore
└── LICENSE

πŸ“Έ Screenshots

Coming soon β€” PRs welcome!

πŸ”§ Troubleshooting

Issue Fix
Port 80/443 in use Stop other services or change ports in cluster/k3d-config.yaml
*.localhost not resolving Add entries to /etc/hosts or use make argocd-ui for port-forward
ArgoCD apps stuck Progressing Check make logs β€” usually waiting for images to pull
Docker out of disk Run docker system prune -a

πŸ“– Full guide: docs/TROUBLESHOOTING.md

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Ideas for Contributions

  • Add more example apps (Redis, PostgreSQL, etc.)
  • CI pipeline for validation
  • Automated screenshots
  • Loki for log aggregation
  • Cert-manager for TLS
  • Crossplane for cloud resources
  • Tekton/Argo Workflows for CI

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with ❀️ for the Kubernetes community
If this helped you, give it a ⭐!

About

πŸš€ Single-command local Kubernetes platform with ArgoCD, Prometheus, Grafana, and NGINX Ingress β€” perfect for learning and demos

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages