Kubernetes Deployment

Advanced ⏱ 60 minutes 📅 Updated Aug 2026

Official minimal Kubernetes deployment using OpenClaw's Kustomize manifests and deployment script.

📋 Prerequisites

1

Deploy the official manifests

bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw

# Replace this with your provider key
export OPENAI_API_KEY="your-openai-api-key"
./scripts/k8s/deploy.sh
bash
kubectl get pods -n openclaw
kubectl rollout status deployment/openclaw -n openclaw
2

Retrieve the Gateway token

bash
kubectl get secret openclaw-secrets -n openclaw \
  -o jsonpath='{.data.OPENCLAW_GATEWAY_TOKEN}' | base64 -d
echo
3

Access the Control UI

bash
kubectl port-forward svc/openclaw 18789:18789 -n openclaw
# Open http://127.0.0.1:18789 and enter the token from Step 2
4

Customize configuration

bash
# Edit openclaw.json and AGENTS.md in the official ConfigMap
${EDITOR:-vi} scripts/k8s/manifests/configmap.yaml

# Re-apply and restart the pod
./scripts/k8s/deploy.sh
5

Operate or remove the deployment

bash
# Re-deploy current configuration
./scripts/k8s/deploy.sh

# Delete the namespace and its persistent volume claim
./scripts/k8s/deploy.sh --delete

Production exposure

text
The bundled manifests bind the Gateway to loopback for port forwarding.
Before adding an Ingress or load balancer, switch to a non-loopback bind,
keep Gateway authentication enabled, terminate TLS, and configure explicit
Control UI allowed origins.
Kubernetes

Minimal Starting Point

The official manifests deploy one Gateway with persistent state. Adapt security, backups, and availability controls before production use.