Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Created March 5, 2026 04:04
Show Gist options
  • Select an option

  • Save thanakijwanavit/48d5b4f6e65b3d1c7efb168f10f9310b to your computer and use it in GitHub Desktop.

Select an option

Save thanakijwanavit/48d5b4f6e65b3d1c7efb168f10f9310b to your computer and use it in GitHub Desktop.
Deploying Gasclaw on Kubernetes with Helm

Deploying Gasclaw on Kubernetes (Helm)

Gasclaw runs a Gastown multi-agent workspace managed by OpenClaw on Telegram, with Kimi K2.5 as the LLM backend. This guide deploys it to any Kubernetes cluster using the included Helm chart.

Prerequisites

  • Kubernetes cluster (1.24+)
  • Helm 3
  • kubectl configured for your cluster
  • API keys: Kimi keys, Telegram bot token, Telegram owner ID

1. Clone the repo

git clone https://github.com/gastown-publish/gasclaw.git
cd gasclaw

2. Create your secrets

Option A — External Secret (recommended for production):

kubectl create secret generic gasclaw-secrets \
  --from-literal=GASTOWN_KIMI_KEYS="sk-key1:sk-key2:sk-key3" \
  --from-literal=OPENCLAW_KIMI_KEY="sk-overseer-key" \
  --from-literal=TELEGRAM_BOT_TOKEN="123456789:ABCdefGHIjklMNOpqrsTUVwxyz" \
  --from-literal=TELEGRAM_OWNER_ID="2045995148"

Option B — Inline values (quick testing only):

# Pass secrets directly (stored in Helm release — less secure)
helm install gasclaw deploy/helm/gasclaw/ \
  --set secret.create.gastwonKimiKeys="sk-key1:sk-key2" \
  --set secret.create.openclawKimiKey="sk-overseer" \
  --set secret.create.telegramBotToken="123:ABC" \
  --set secret.create.telegramOwnerId="12345"

3. Install the chart

# With external secret (Option A):
helm install gasclaw deploy/helm/gasclaw/ \
  --set secret.existingSecret=gasclaw-secrets

# Optional: customize values
helm install gasclaw deploy/helm/gasclaw/ \
  --set secret.existingSecret=gasclaw-secrets \
  --set config.gtAgentCount="4" \
  --set persistence.workspace.size=50Gi \
  --set resources.requests.memory=1Gi \
  --set resources.limits.memory=4Gi

4. Watch it come up

Bootstrap runs a 10-step startup sequence (Kimi proxy → Gastown → Dolt → OpenClaw → skills → daemon → mayor). This takes 2–5 minutes on first start.

# Watch pod status
kubectl get pods -l app.kubernetes.io/instance=gasclaw -w

# Tail bootstrap logs
kubectl logs -f statefulset/gasclaw

5. Verify

# Port-forward the OpenClaw gateway
kubectl port-forward svc/gasclaw 18789:18789

# Health check
curl http://localhost:18789/health

Once healthy, send a message to your Telegram bot — it should respond.

What gets deployed

Resource Kind Purpose
gasclaw StatefulSet (1 replica) Runs the container
gasclaw Service (ClusterIP) Exposes gateway port 18789
gasclaw ConfigMap Non-secret env vars (agent count, intervals, ports)
gasclaw Secret API keys + tokens (conditional)
gasclaw ServiceAccount Pod identity
workspace PVC (20Gi) Agent workspace, logs, Gastown HQ state
project PVC (10Gi) The git repo agents work on

Home directories (/root/.openclaw, .dolt, .gasclaw, .claude-config, .kimi-accounts) use emptyDir by default — bootstrap regenerates them on start.

Key configuration

All values are in deploy/helm/gasclaw/values.yaml. Highlights:

Value Default Description
image.repository thanakijwanavit/gasclaw Docker Hub image (amd64 + arm64)
config.gtAgentCount "6" Number of Gastown crew workers
config.monitorInterval "300" Health check interval (seconds)
config.activityDeadline "3600" Max seconds between commits
persistence.workspace.size 20Gi Workspace PVC size
persistence.project.size 10Gi Project PVC size
probes.startup.failureThreshold 27 ~5 min startup budget

Upgrading

helm upgrade gasclaw deploy/helm/gasclaw/ \
  --set secret.existingSecret=gasclaw-secrets

ConfigMap changes trigger a pod restart automatically (via checksum annotation).

Uninstalling

helm uninstall gasclaw

# PVCs are retained by default — delete manually if needed:
kubectl delete pvc workspace-gasclaw-0 project-gasclaw-0

Troubleshooting

Pod stuck in CrashLoopBackOff:

kubectl logs gasclaw-0 --previous   # check the last crash

Usually a missing or invalid secret. Verify your keys are set.

Pod stuck in not-ready: The startup probe allows 5 minutes. If it's still not ready, check logs — bootstrap likely failed at a specific step.

Storage class issues:

# List available storage classes
kubectl get sc

# Use a specific one
helm install gasclaw deploy/helm/gasclaw/ \
  --set secret.existingSecret=gasclaw-secrets \
  --set persistence.workspace.storageClass=gp3 \
  --set persistence.project.storageClass=gp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment