You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KubeStore — Kubernetes Store Provisioning Platform
Urumi AI SDE Internship — Round 1: System Design Assessment
A store provisioning platform that deploys fully-functional MedusaJS and WooCommerce e-commerce stores on Kubernetes. The same Helm charts run identically on a local Kind cluster and a production VPS (k3s), differing only via Helm values.
git clone https://github.com/0prashantyadav0/KubeStore.git
cd KubeStore
# Go backendcd backend && go mod download &&cd ..
# React dashboardcd frontend && npm install &&cd ..
Step 2 — Create the Kind cluster
make kind-create # Creates cluster with ingress-ready port mappings
make ingress-install # Deploys NGINX Ingress Controller
make ingress-wait # Blocks until the controller pod is ready
Step 3 — Build & load Docker images
# Build all images (platform backend, dashboard, MedusaJS, storefront)
make docker-build-all
# Load them into the Kind cluster (imagePullPolicy: Never)
make kind-load
WooCommerce uses official Docker Hub images (wordpress:6-apache, mariadb:11) with imagePullPolicy: IfNotPresent, so no custom build is required.
Step 4 — Start the platform
# Terminal 1 — Go backend (runs on :8080)
make run
# Terminal 2 — React dashboard (runs on :5173)cd frontend && npm run dev
nip.io is a wildcard DNS service that resolves any *.127.0.0.1.nip.io address back to 127.0.0.1. Combined with the Kind cluster's host-port mapping (ports 80/443), this gives each store a stable, unique URL without editing /etc/hosts.
🛒 Create a Store & Place an Order
Via the Dashboard (recommended)
Click "Create Store" and enter a name. Choose MedusaJS or WooCommerce as the engine.
The status changes through Provisioning → Ready.
Click the Store / Admin links that appear.
Via the REST API
# Create a MedusaJS store
curl -s -X POST http://localhost:8080/api/stores \
-H 'Content-Type: application/json' \
-d '{"name":"my-shop","engine":"medusa"}'| jq
# Create a WooCommerce store
curl -s -X POST http://localhost:8080/api/stores \
-H 'Content-Type: application/json' \
-d '{"name":"wp-shop","engine":"woocommerce"}'| jq
# List all stores
curl -s http://localhost:8080/api/stores | jq
# Delete a store (removes namespace + all resources)
curl -s -X DELETE http://localhost:8080/api/stores/{storeId}
Placing an order end-to-end (MedusaJS)
Step
How
1. Open storefront
Click the Store link on the dashboard (redirects to /us/)
2. Browse products
10 seeded products with Unsplash images are available
3. Add to cart
Click a product → select size/colour → Add to Cart
4. Checkout
Go to Cart → Checkout → fill shipping address → select Manual Payment → Place Order
5. Verify in admin
Open the Admin link → log in (credentials in K8s Secret, default admin@medusa.local) → Orders section
Admin credentials for a Kubernetes-deployed store:
Click the Store link → WordPress setup wizard completes automatically
2. Admin
Go to /wp-admin/ → credentials from K8s Secret
3. Install WooCommerce
Via Plugins → search "WooCommerce" → Install & Activate
4. Add product & checkout
Add a sample product, visit shop, add to cart, checkout with COD
🏭 VPS / Production Setup (k3s)
1. Install k3s on the VPS
curl -sfL https://get.k3s.io | sh -
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
2. Push images to a registry (or load directly)
# Option A — push to a registry
docker tag kubestore-medusa:latest ghcr.io/<you>/kubestore-medusa:latest
docker push ghcr.io/<you>/kubestore-medusa:latest
# (repeat for kubestore-storefront, kubestore-backend, kubestore-dashboard)# Option B — import directly on the VPS
docker save kubestore-medusa:latest | ssh vps 'sudo k3s ctr images import -'
Create store {"name":"...","engine":"medusa|woocommerce"}
GET
/api/stores
List all stores (sorted by creation time)
GET
/api/stores/{id}
Get single store
DELETE
/api/stores/{id}
Delete store + namespace + all resources
Operations
Method
Endpoint
Description
POST
/api/stores/{id}/upgrade
Helm upgrade with new values
POST
/api/stores/{id}/rollback
Helm rollback to revision {"revision":1}
POST
/api/stores/{id}/restart
Restart all pods in the store
GET
/api/stores/{id}/health
Live health check (engine-aware)
GET
/api/stores/{id}/pods
Pod status + CPU/memory usage
GET
/api/stores/{id}/logs?component=medusa&lines=100
Component logs
GET
/api/stores/{id}/events
Kubernetes events
GET
/api/stores/{id}/history
Helm release history
Platform
Method
Endpoint
Description
GET
/health
Backend health check
GET
/metrics
Prometheus-format metrics
GET
/api/metrics
JSON platform metrics
GET
/api/audit
Audit log (who created/deleted what, when)
🧪 Makefile Commands
# ── Development ──
make run # Start Go backend locally
make build # Compile Go binary
make test# Run unit tests# ── Docker ──
make docker-build-all # Build platform + all engine images
make docker-build-medusa # Build MedusaJS image only
make docker-build-storefront # Build Next.js storefront image only# ── Kind Cluster ──
make kind-create # Create Kind cluster with ingress port mappings
make kind-delete # Tear down cluster
make kind-load # Load all images into Kind# ── Ingress ──
make ingress-install # Deploy NGINX Ingress Controller
make ingress-wait # Wait for controller readiness# ── Helm ──
make helm-lint # Lint all Helm charts (medusa + woocommerce)
make helm-template # Dry-run template rendering# ── Frontend ──
make frontend-dev # Start Vite dev server
make frontend-build # Production build