Helm chart for deploying OpenClaw — an AI gateway and agent platform — on Kubernetes.
helm repo add cabrera-evil https://cabrera-evil.github.io/charts/
helm install my-openclaw cabrera-evil/openclaw \
--set secret.anthropicApiKey=sk-ant-... \
--set secret.gatewayToken=my-secret-token
Then access the Control UI:
kubectl port-forward svc/my-openclaw 18789:18789
open http://localhost:18789
This chart deploys OpenClaw in a single pod with a ConfigMap-managed configuration, a persistent volume for agent state, and an optional secret for provider API keys and gateway authentication. It follows the security and scalability conventions established in the Cabrera Evil charts collection.
loopback for port-forward, 0.0.0.0 for Ingress/LoadBalancer)openclaw.json and AGENTS.md — no image rebuilds neededgateway.bind=loopbackmaxUnavailable: 0) by defaultreadOnlyRootFilesystem, drop: ALL, non-root UID 1000helm install my-openclaw cabrera-evil/openclaw \
--set secret.anthropicApiKey=sk-ant-... \
--set secret.gatewayToken=my-secret-token
Create my-values.yaml:
secret:
gatewayToken: "my-secret-token"
anthropicApiKey: "sk-ant-..."
persistence:
size: 20Gi
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
Install:
helm install my-openclaw cabrera-evil/openclaw -f my-values.yaml
kubectl get secret my-openclaw-secret \
-o jsonpath='{.data.OPENCLAW_GATEWAY_TOKEN}' | base64 -d
| Parameter | Description | Default |
|---|---|---|
gateway.bind |
Gateway bind address (loopback or 0.0.0.0) |
loopback |
gateway.port |
Gateway port | 18789 |
gateway.tokenAuth |
Enable token-based auth for the Control UI | true |
extraGatewayConfig |
Additional keys merged into openclaw.json |
{} |
agentsConfig |
Content of AGENTS.md injected into the ConfigMap |
See values |
| Parameter | Description | Default |
|---|---|---|
secret.enabled |
Create the provider keys Secret | true |
secret.gatewayToken |
Control UI authentication token | "" |
secret.anthropicApiKey |
Anthropic API key | "" |
secret.geminiApiKey |
Google Gemini API key | "" |
secret.openaiApiKey |
OpenAI API key | "" |
secret.openrouterApiKey |
OpenRouter API key | "" |
Only non-empty keys are written into the Secret — unused providers leave no empty env vars.
| Parameter | Description | Default |
|---|---|---|
image.repository |
Container image repository | ghcr.io/openclaw/openclaw |
image.pullPolicy |
Image pull policy | IfNotPresent |
image.tag |
Image tag (defaults to chart appVersion) |
"" |
| Parameter | Description | Default |
|---|---|---|
persistence.enabled |
Enable persistent storage for agent state | true |
persistence.size |
PVC size | 10Gi |
persistence.storageClass |
Storage class (empty = cluster default) | "" |
persistence.accessMode |
PVC access mode | ReadWriteOnce |
persistence.mountPath |
Mount path inside the container | /home/openclaw |
| Parameter | Description | Default |
|---|---|---|
service.type |
Kubernetes service type | ClusterIP |
service.port |
Service port | 18789 |
service.annotations |
Service annotations | {} |
| Parameter | Description | Default |
|---|---|---|
ingress.enabled |
Enable Ingress | false |
ingress.className |
Ingress class name | traefik |
ingress.annotations |
Ingress annotations | Traefik + cert-manager defaults |
ingress.hosts |
Ingress hostnames and paths | openclaw.local / |
ingress.tls |
TLS configuration | See values |
Note:
ingress.enabled=truerequiresgateway.bind=0.0.0.0. The chart will fail with a clear error if this constraint is violated.
| Parameter | Description | Default |
|---|---|---|
livenessProbe.enabled |
Enable liveness probe | true |
livenessProbe.initialDelaySeconds |
Initial delay | 10 |
livenessProbe.periodSeconds |
Check interval | 15 |
livenessProbe.failureThreshold |
Failures before restart | 3 |
readinessProbe.enabled |
Enable readiness probe | true |
readinessProbe.initialDelaySeconds |
Initial delay | 5 |
startupProbe.enabled |
Enable startup probe | true |
startupProbe.failureThreshold |
Max failures (24 × 5s = 2 min window) | 24 |
| Parameter | Description | Default |
|---|---|---|
podSecurityContext.fsGroup |
Filesystem group for the pod | 1000 |
securityContext.runAsUser |
Container UID | 1000 |
securityContext.runAsGroup |
Container GID | 1000 |
securityContext.runAsNonRoot |
Enforce non-root execution | true |
securityContext.readOnlyRootFilesystem |
Read-only root filesystem | true |
securityContext.allowPrivilegeEscalation |
Allow privilege escalation | false |
| Parameter | Description | Default |
|---|---|---|
autoscaling.enabled |
Enable HPA | false |
autoscaling.minReplicas |
Minimum replicas | 1 |
autoscaling.maxReplicas |
Maximum replicas | 5 |
autoscaling.targetCPUUtilizationPercentage |
CPU target | 80 |
autoscaling.targetMemoryUtilizationPercentage |
Memory target | 80 |
| Parameter | Description | Default |
|---|---|---|
podDisruptionBudget.enabled |
Enable PDB | false |
podDisruptionBudget.minAvailable |
Minimum available pods | 1 |
networkPolicy.enabled |
Enable NetworkPolicy | false |
Default configuration — no changes needed:
helm install openclaw cabrera-evil/openclaw \
--set secret.anthropicApiKey=sk-ant-...
kubectl port-forward svc/openclaw 18789:18789
open http://localhost:18789
gateway:
bind: "0.0.0.0"
ingress:
enabled: true
className: traefik
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
hosts:
- host: openclaw.example.com
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- openclaw.example.com
secretName: openclaw-tls
secret:
gatewayToken: "your-strong-token"
anthropicApiKey: "sk-ant-..."
secret:
gatewayToken: "your-strong-token"
anthropicApiKey: "sk-ant-..."
openaiApiKey: "sk-..."
geminiApiKey: "AI..."
replicaCount: 3
# Requires ReadWriteMany storage class for shared persistent state
persistence:
accessMode: ReadWriteMany
storageClass: efs # or nfs, azureblob, etc.
podDisruptionBudget:
enabled: true
minAvailable: 2
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 10
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/name: openclaw
agentsConfig: |
# My OpenClaw Agents
You are a helpful assistant specialized in internal tooling.
Always respond in the user's language.
## Available Skills
- code-review
- documentation
extraGatewayConfig:
logLevel: debug
maxConcurrentSessions: 20
Disable the chart-managed secret and reference your own:
secret:
enabled: false
envFrom:
- secretRef:
name: my-existing-openclaw-secret
image:
tag: "1.2.3" # see https://github.com/openclaw/openclaw/releases
persistence:
storageClass: "fast-nvme"
size: 50Gi
kubectl patch secret my-openclaw-secret \
-p '{"stringData":{"OPENAI_API_KEY":"sk-..."}}'
kubectl rollout restart deployment/my-openclaw
helm repo update
helm upgrade my-openclaw cabrera-evil/openclaw -f my-values.yaml
Config and secret changes automatically trigger a rolling restart via checksum annotations — no manual rollout needed when values change.
kubectl describe pod -l app.kubernetes.io/name=openclaw
kubectl logs deployment/my-openclaw
Verify the gateway is reachable on /health:
kubectl port-forward svc/my-openclaw 18789:18789
curl http://localhost:18789/health
Ensure gateway.bind is set to 0.0.0.0 — the loopback bind is not reachable by ingress controllers. The chart will reject this configuration at render time.
kubectl get pvc
kubectl describe pvc my-openclaw-data
kubectl get storageclass
kubectl get configmap my-openclaw-config -o yaml
kubectl exec deploy/my-openclaw -- cat /etc/openclaw/openclaw.json
helm uninstall my-openclaw
Note: The PVC is not deleted automatically. To remove all data:
kubectl delete pvc my-openclaw-data
gateway.tokenAuth: true and set a strong secret.gatewayToken in productionnetworkPolicy to restrict egress to only the model provider endpoints you use0.0.0.0 — never expose the loopback gateway directlyFor a full list of parameters see values.yaml.
Key sections:
gateway.* — Gateway bind, port, and token authagentsConfig — AGENTS.md contentextraGatewayConfig — Extra openclaw.json keyssecret.* — Provider API keys and gateway tokenpersistence.* — Persistent volume for agent stateservice.* — Kubernetes serviceingress.* — Ingress (requires gateway.bind=0.0.0.0)autoscaling.* — HPA configurationpodDisruptionBudget.* — PDB for HAnetworkPolicy.* — Network isolation*Probe.* — Liveness, readiness, and startup probesThis chart is licensed under the MIT License.