K3s / Kubernetes Deployment
Deploy all 9 BMAD agents on Kubernetes using K3s.
Prerequisites
- Linux server — Ubuntu 22.04+ or Debian 12+ recommended
- 4 GB RAM minimum (8 GB recommended for all 9 agents)
- 2+ CPU cores
- Root or sudo access
- An OpenRouter API key
One-Line Installer
The fastest way to get everything running:
curl -sfL https://k8.virtualgpt.cloud/install.sh | bash
This script performs the following steps automatically:
- Checks system requirements (RAM, CPU, OS)
- Installs K3s if not already present
- Waits for K3s to become ready
- Clones the
agent0-bmad-k8repository - Prompts for your OpenRouter API key
- Creates the
bmadKubernetes namespace - Generates and applies Kubernetes secrets
- Applies ConfigMap, PVC, deployments, and ingress
- Waits for all 9 agent pods to become ready
Manual K3s Setup
Step 1: Install K3s
curl -sfL https://get.k3s.io | sh -
# Wait for K3s to be ready
kubectl get nodes
Step 2: Clone the Repository
git clone https://github.com/t4tarzan/agent0-bmad-k8.git
cd agent0-bmad-k8
Step 3: Configure Secrets
Edit the secrets file with your API keys:
vi k8s/bmad/secrets.yaml
Replace the placeholder values with your base64-encoded API keys:
# Encode your API key
echo -n "sk-or-v1-your-key-here" | base64
Step 4: Deploy
./k8s/bmad/deploy-bmad.sh
Or apply manifests individually:
kubectl apply -f k8s/bmad/namespace.yaml
kubectl apply -f k8s/bmad/secrets.yaml
kubectl apply -f k8s/bmad/configmap.yaml
kubectl apply -f k8s/bmad/pvc.yaml
kubectl apply -f k8s/bmad/deployment-template.yaml
kubectl apply -f k8s/bmad/ingress.yaml
Step 5: Verify
# Check pod status
kubectl get pods -n bmad
# Check logs for a specific agent
kubectl logs -n bmad deployment/bmad-orchestrator
# Port-forward to test locally
kubectl port-forward -n bmad svc/bmad-orchestrator 50001:80
K8s Manifest Details
| File | Purpose |
|---|---|
namespace.yaml | Creates the bmad namespace |
configmap.yaml | Shared configuration: model providers, model names, A2A settings |
secrets.yaml | API keys (OpenRouter, OpenAI) as Kubernetes secrets |
pvc.yaml | Persistent Volume Claim for shared project files |
deployment-template.yaml | Deployment specs for all 9 agent pods |
ingress.yaml | Ingress rules for external access |
deploy-bmad.sh | Convenience script to apply all manifests in order |
Resource Requirements
| Agents | Min RAM | Recommended RAM | CPU |
|---|---|---|---|
| 5 (live demo) | 4 GB | 6 GB | 2 cores |
| 9 (full team) | 6 GB | 8 GB | 4 cores |
Scaling
Each agent runs as an independent deployment and can be scaled independently:
# Scale the developer agent to 2 replicas
kubectl scale deployment/bmad-dev -n bmad --replicas=2
Note: Scaling agents requires corresponding updates to the GMeet backend's agent map and additional API key capacity on your OpenRouter account.
Uninstalling
# Remove all BMAD resources
kubectl delete namespace bmad
# Optionally uninstall K3s
/usr/local/bin/k3s-uninstall.sh