openclaw

by cabrera-evil

Helm chartv0.1.0App latestVerified publisher

Helm chart for deploying OpenClaw AI gateway on Kubernetes

About this chart

OpenClaw Helm Chart

Helm chart for deploying OpenClaw — an AI gateway and agent platform — on Kubernetes.

TL;DR

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

Introduction

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.

Features

  • Configurable gateway bind (loopback for port-forward, 0.0.0.0 for Ingress/LoadBalancer)
  • Persistent storage for agent state and conversation memory
  • ConfigMap-driven openclaw.json and AGENTS.md — no image rebuilds needed
  • Secret injection for provider API keys (Anthropic, Gemini, OpenAI, OpenRouter)
  • Automatic rolling updates on config or secret changes (checksum annotations)
  • Startup, liveness, and readiness probes with a 2-minute startup window
  • Optional HPA, PodDisruptionBudget, and NetworkPolicy for production HA deployments
  • Hard validation guard — Ingress is blocked when gateway.bind=loopback
  • Zero-downtime rolling strategy (maxUnavailable: 0) by default
  • Full security hardening: readOnlyRootFilesystem, drop: ALL, non-root UID 1000

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure
  • API key for at least one model provider (Anthropic, Gemini, OpenAI, or OpenRouter)

Installing the Chart

Quick install (port-forward access)

helm install my-openclaw cabrera-evil/openclaw \
  --set secret.anthropicApiKey=sk-ant-... \
  --set secret.gatewayToken=my-secret-token

Using a values file (recommended)

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

Retrieve the gateway token after install

kubectl get secret my-openclaw-secret \
  -o jsonpath='{.data.OPENCLAW_GATEWAY_TOKEN}' | base64 -d

Configuration

Gateway Configuration

ParameterDescriptionDefault
gateway.bindGateway bind address (loopback or 0.0.0.0)loopback
gateway.portGateway port18789
gateway.tokenAuthEnable token-based auth for the Control UItrue
extraGatewayConfigAdditional keys merged into openclaw.json{}
agentsConfigContent of AGENTS.md injected into the ConfigMapSee values

Secret / API Keys

ParameterDescriptionDefault
secret.enabledCreate the provider keys Secrettrue
secret.gatewayTokenControl UI authentication token""
secret.anthropicApiKeyAnthropic API key""
secret.geminiApiKeyGoogle Gemini API key""
secret.openaiApiKeyOpenAI API key""
secret.openrouterApiKeyOpenRouter API key""

Only non-empty keys are written into the Secret — unused providers leave no empty env vars.

Image Configuration

ParameterDescriptionDefault
image.repositoryContainer image repositoryghcr.io/openclaw/openclaw
image.pullPolicyImage pull policyIfNotPresent
image.tagImage tag (defaults to chart appVersion)""

Persistence Configuration

ParameterDescriptionDefault
persistence.enabledEnable persistent storage for agent statetrue
persistence.sizePVC size10Gi
persistence.storageClassStorage class (empty = cluster default)""
persistence.accessModePVC access modeReadWriteOnce
persistence.mountPathMount path inside the container/home/openclaw

Service Configuration

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.portService port18789
service.annotationsService annotations{}

Ingress Configuration

ParameterDescriptionDefault
ingress.enabledEnable Ingressfalse
ingress.classNameIngress class nametraefik
ingress.annotationsIngress annotationsTraefik + cert-manager defaults
ingress.hostsIngress hostnames and pathsopenclaw.local /
ingress.tlsTLS configurationSee values

Note: ingress.enabled=true requires gateway.bind=0.0.0.0. The chart will fail with a clear error if this constraint is violated.

Health Probe Configuration

ParameterDescriptionDefault
livenessProbe.enabledEnable liveness probetrue
livenessProbe.initialDelaySecondsInitial delay10
livenessProbe.periodSecondsCheck interval15
livenessProbe.failureThresholdFailures before restart3
readinessProbe.enabledEnable readiness probetrue
readinessProbe.initialDelaySecondsInitial delay5
startupProbe.enabledEnable startup probetrue
startupProbe.failureThresholdMax failures (24 × 5s = 2 min window)24

Security Configuration

ParameterDescriptionDefault
podSecurityContext.fsGroupFilesystem group for the pod1000
securityContext.runAsUserContainer UID1000
securityContext.runAsGroupContainer GID1000
securityContext.runAsNonRootEnforce non-root executiontrue
securityContext.readOnlyRootFilesystemRead-only root filesystemtrue
securityContext.allowPrivilegeEscalationAllow privilege escalationfalse

Autoscaling Configuration

ParameterDescriptionDefault
autoscaling.enabledEnable HPAfalse
autoscaling.minReplicasMinimum replicas1
autoscaling.maxReplicasMaximum replicas5
autoscaling.targetCPUUtilizationPercentageCPU target80
autoscaling.targetMemoryUtilizationPercentageMemory target80

High Availability Configuration

ParameterDescriptionDefault
podDisruptionBudget.enabledEnable PDBfalse
podDisruptionBudget.minAvailableMinimum available pods1
networkPolicy.enabledEnable NetworkPolicyfalse

Common Use Cases

Local development (port-forward)

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

Expose via Ingress (HTTPS with cert-manager)

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-..."

Multi-provider setup

secret:
  gatewayToken: "your-strong-token"
  anthropicApiKey: "sk-ant-..."
  openaiApiKey: "sk-..."
  geminiApiKey: "AI..."

High availability deployment

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

Custom agent instructions

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

Add extra gateway config

extraGatewayConfig:
  logLevel: debug
  maxConcurrentSessions: 20

Using an existing secret (External Secrets / Sealed Secrets)

Disable the chart-managed secret and reference your own:

secret:
  enabled: false

envFrom:
  - secretRef:
      name: my-existing-openclaw-secret

Customization

Pin a specific OpenClaw version

image:
  tag: "1.2.3" # see https://github.com/openclaw/openclaw/releases

Custom storage class

persistence:
  storageClass: "fast-nvme"
  size: 50Gi

Add provider keys after install (patch secret directly)

kubectl patch secret my-openclaw-secret \
  -p '{"stringData":{"OPENAI_API_KEY":"sk-..."}}'
kubectl rollout restart deployment/my-openclaw

Upgrading

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.

Troubleshooting

Pod is not starting

kubectl describe pod -l app.kubernetes.io/name=openclaw
kubectl logs deployment/my-openclaw

Health check failing

Verify the gateway is reachable on /health:

kubectl port-forward svc/my-openclaw 18789:18789
curl http://localhost:18789/health

Ingress returns connection refused

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.

PVC not binding

kubectl get pvc
kubectl describe pvc my-openclaw-data
kubectl get storageclass

Check rendered configuration

kubectl get configmap my-openclaw-config -o yaml
kubectl exec deploy/my-openclaw -- cat /etc/openclaw/openclaw.json

Uninstalling

helm uninstall my-openclaw

Note: The PVC is not deleted automatically. To remove all data:

kubectl delete pvc my-openclaw-data

Security Considerations

  • Keep gateway.tokenAuth: true and set a strong secret.gatewayToken in production
  • Use External Secrets Operator or Sealed Secrets to avoid storing API keys in plain-text values files
  • Enable networkPolicy to restrict egress to only the model provider endpoints you use
  • Use HTTPS (Ingress + TLS) when binding to 0.0.0.0 — never expose the loopback gateway directly
  • The chart enforces non-root execution, read-only root filesystem, and dropped Linux capabilities by default

Parameters Reference

For a full list of parameters see values.yaml.

Key sections:

  • gateway.* — Gateway bind, port, and token auth
  • agentsConfig — AGENTS.md content
  • extraGatewayConfig — Extra openclaw.json keys
  • secret.* — Provider API keys and gateway token
  • persistence.* — Persistent volume for agent state
  • service.* — Kubernetes service
  • ingress.* — Ingress (requires gateway.bind=0.0.0.0)
  • autoscaling.* — HPA configuration
  • podDisruptionBudget.* — PDB for HA
  • networkPolicy.* — Network isolation
  • *Probe.* — Liveness, readiness, and startup probes

License

Deploy openclaw with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has openclaw on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartopenclaw is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply