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:

  1. Checks system requirements (RAM, CPU, OS)
  2. Installs K3s if not already present
  3. Waits for K3s to become ready
  4. Clones the agent0-bmad-k8 repository
  5. Prompts for your OpenRouter API key
  6. Creates the bmad Kubernetes namespace
  7. Generates and applies Kubernetes secrets
  8. Applies ConfigMap, PVC, deployments, and ingress
  9. 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

FilePurpose
namespace.yamlCreates the bmad namespace
configmap.yamlShared configuration: model providers, model names, A2A settings
secrets.yamlAPI keys (OpenRouter, OpenAI) as Kubernetes secrets
pvc.yamlPersistent Volume Claim for shared project files
deployment-template.yamlDeployment specs for all 9 agent pods
ingress.yamlIngress rules for external access
deploy-bmad.shConvenience script to apply all manifests in order

Resource Requirements

AgentsMin RAMRecommended RAMCPU
5 (live demo)4 GB6 GB2 cores
9 (full team)6 GB8 GB4 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