Deploy OpenClaw on any Kubernetes cluster as an Ankra stack, and connect it to Ankra by adding the CLI as a skill for AI-powered infrastructure management.
OpenClaw is an autonomous AI agent that works across chat platforms like Slack, Discord, and Telegram. By adding the Ankra CLI as an OpenClaw skill, your agent can manage clusters, deploy stacks, troubleshoot issues, and chat with Ankra’s AI — all from your preferred messaging app.This guide covers two things:
Deploying OpenClaw on any Kubernetes cluster as an Ankra stack
Connecting OpenClaw to Ankra by adding the Ankra CLI as a skill
What this enables:
Deploy OpenClaw to any Kubernetes cluster with a single stack
Ask your OpenClaw agent to list clusters, check status, or scale workers
Deploy and manage stacks through natural language
Run Ankra AI chat queries from any OpenClaw-connected platform
Manage credentials, charts, and tokens via conversation
Deploy OpenClaw to any Kubernetes cluster managed by Ankra using the Stack Builder. This gives you a self-hosted, containerized AI agent running inside your infrastructure.
OpenClaw stores workspace data and conversation memory. Enable persistence so this survives pod restarts:
Copy
persistence: enabled: true size: 5Gi
Encrypt sensitive values with SOPS: In the manifest edit view, click the SOPS button to encrypt your API key. This ensures the key is stored encrypted in your GitOps repository. See SOPS Encryption for setup instructions.
OpenClaw has shell access and can read files inside its container. Kubernetes provides meaningful isolation through container boundaries and network policies. For sensitive environments, apply a NetworkPolicy to restrict egress to only the AI provider API endpoints your model requires.
Press ⌘+J in the Stack Builder to get AI help with your OpenClaw deployment:
Basic OpenClaw Deployment
Copy
Deploy OpenClaw to my cluster with Anthropic API key,persistent storage, and basic resource limits.
Production OpenClaw with Slack
Copy
Deploy OpenClaw for production with:- API key stored in a Kubernetes Secret- Slack bot integration- Network policy restricting egress to Anthropic API- Security hardening with non-root user- Ingress with TLS on openclaw.mycompany.com
OpenClaw with Ankra CLI Skill
Copy
Deploy OpenClaw with the Ankra CLI pre-installed soit can manage my clusters. Include the Ankra API tokenas an environment variable from a Secret.
Once OpenClaw is running (either via the stack above or any other installation), you can give it the ability to manage your Ankra infrastructure by adding the CLI as a skill.
Create ~/.openclaw/skills/ankra/SKILL.md with the following content:
Copy
---name: ankraversion: 1.0.0author: your-orgdescription: > Manage Kubernetes clusters and infrastructure on the Ankra platform. Use when the user wants to list clusters, deploy stacks, check cluster health, manage addons, search Helm charts, scale workers, or troubleshoot Kubernetes issues.permissions: - shell - networkconfig: api_token: type: string required: true description: "Ankra API token for authentication" secret: true---# Ankra Platform ManagementYou have access to the `ankra` CLI to manage Kubernetes clusters on the Ankra platform.## Available Commands### Cluster Operations- `ankra cluster list` -- List all clusters- `ankra cluster get <name>` -- Get cluster details- `ankra cluster select` -- Select a cluster (use `--name` for non-interactive)- `ankra cluster reconcile [name]` -- Trigger reconciliation### AI Chat- `ankra chat "<question>"` -- Ask Ankra AI about your infrastructure- `ankra chat health` -- Get cluster health summary- `ankra chat health --ai` -- Get AI-analyzed cluster health### Stack Management- `ankra cluster stacks list` -- List stacks- `ankra cluster stacks create <name>` -- Create a stack- `ankra cluster stacks delete <name>` -- Delete a stack- `ankra cluster stacks history <name>` -- View stack change history### Helm Charts- `ankra charts search <query>` -- Search for charts- `ankra charts info <name>` -- Get chart details- `ankra charts list` -- List available charts### Hetzner Cluster Provisioning- `ankra cluster hetzner create --name <n> --credential-id <id> --location <loc>` -- Create cluster- `ankra cluster hetzner workers <id>` -- Get worker count- `ankra cluster hetzner node-group list <id>` -- List node groups- `ankra cluster hetzner node-group scale <id> <group> <count>` -- Scale a node group- `ankra cluster hetzner deprovision <id>` -- Deprovision cluster### OVH Cluster Provisioning- `ankra cluster ovh create --name <n> --credential-id <id> --region <r>` -- Create cluster- `ankra cluster ovh workers <id>` -- Get worker count- `ankra cluster ovh scale <id> <count>` -- Scale workers### UpCloud Cluster Provisioning- `ankra cluster upcloud create --name <n> --credential-id <id> --zone <z>` -- Create cluster- `ankra cluster upcloud workers <id>` -- Get worker count- `ankra cluster upcloud scale <id> <count>` -- Scale workers### Credentials- `ankra credentials list` -- List all credentials- `ankra credentials get <id>` -- Get credential details### API Tokens- `ankra tokens list` -- List API tokens- `ankra tokens create <name>` -- Create a token- `ankra tokens revoke <id>` -- Revoke a token## Guardrails- Always confirm with the user before running destructive operations like `deprovision`, `delete`, or `scale` (down).- When scaling workers, show the current count first and ask for confirmation.- Never expose API tokens or credentials in responses.- For cluster creation, list the parameters back to the user and ask for confirmation before executing.- Prefer `ankra chat` for troubleshooting questions -- it has access to live cluster data.
Restart OpenClaw or wait for the skill watcher to pick up the changes, then test:
Copy
You: List my Ankra clustersAgent: Running `ankra cluster list`...NAME PROVIDER STATE WORKERSstaging-cluster hetzner running 3production ovh running 5
Try a few more:
Copy
You: What's the health of my staging cluster?Agent: Running `ankra chat health` on staging-cluster...
Copy
You: Scale the staging cluster to 5 workersAgent: The staging cluster currently has 3 workers. Scale to 5? (y/n)You: yAgent: Running `ankra cluster hetzner node-group scale <id> default 5`...
You: Create a monitoring stack on my staging clusterAgent: I'll create a new stack called "monitoring" on staging-cluster. Running `ankra cluster stacks create monitoring`... Done. Would you like to search for Prometheus or Grafana charts to add?
You: Why are pods crashing on production?Agent: Let me check with Ankra AI... Running `ankra chat "Why are pods in CrashLoopBackOff?"` on production... Ankra AI found 2 pods in CrashLoopBackOff in the api namespace: - api-server-7d8f9: OOMKilled (memory limit 256Mi, usage peaked at 312Mi) - api-worker-3k9d2: exit code 1, missing DATABASE_URL env var
You: How many workers are running across all my clusters?Agent: Running `ankra cluster list` and checking workers... staging-cluster (hetzner): 3 workers (cx33) production (ovh): 5 workers (b2-15) dev-sandbox (hetzner): 1 worker (cx22) Total: 9 workers across 3 clusters.
If you run OpenClaw in sandboxed mode (Docker), the ANKRA_API_TOKEN environment variable won’t be inherited automatically. Add it to your sandbox config: