OpenClaw in Kubernetes

Running OpenClaw on Kubernetes requires a dedicated namespace, persistent storage for configuration and workspace data, secure API token injection, and an ingress with extended WebSocket timeout support. This template provides a complete single-replica OpenClaw Kubernetes deployment with all of that preconfigured, including TLS termination via cert-manager and 3600-second WebSocket timeouts for long-lived AI agent connections.
| Component | Type | Port | Role |
|---|---|---|---|
| Namespace | Namespace | - | Isolates all OpenClaw resources |
| API Secret | Secret | - | Stores Telegram, Anthropic, and Discord API tokens |
| Config Storage | PersistentVolumeClaim | - | 10Gi volume for OpenClaw configuration data |
| Workspace Storage | PersistentVolumeClaim | - | 20Gi volume for workspace and runtime data |
| OpenClaw | Deployment | - | Single-replica gateway with liveness and readiness probes |
| Service | ClusterIP Service | - | Internal network access to the OpenClaw pod |
| Ingress | NGINX Ingress | 443 | TLS via cert-manager; 3600s WebSocket timeout |
OpenClaw runs as a single-replica Deployment inside its own namespace, backed by two PersistentVolumeClaims for configuration (10Gi) and workspace (20Gi) data. API tokens for Telegram, Anthropic, and Discord are stored in a Kubernetes Secret and injected at pod startup. A ClusterIP Service exposes the pod internally, and an NGINX Ingress handles external traffic with cert-manager TLS and a 3600-second proxy timeout to support persistent WebSocket connections.
kubectl get pods -n openclaw.kubectl describe certificate -n openclaw.This template configures a namespace-isolated OpenClaw deployment on Kubernetes with persistent storage, secret-based API token management, and WebSocket-ready TLS ingress. For a full walkthrough, read Deploying OpenClaw in Kubernetes.