Back to Zeroclaw

ZeroClaw OpenShift deployment

deploy-k8s/README.md

0.8.23.0 KB
Original Source

ZeroClaw OpenShift deployment

Deploy a minimal ZeroClaw agent on OpenShift with an external LLM provider (Anthropic, OpenAI, or any OpenAI-compatible API).

Prerequisites

  • oc CLI authenticated to your OpenShift cluster
  • Container image pushed to an accessible registry
  • API key for your LLM provider

Quick start

  1. Copy the sample manifests to create your real ones:

    bash
    for f in deploy-k8s/*-sample.yaml; do cp "$f" "${f/-sample/}"; done
    
  2. Edit secret.yaml and replace REPLACE_WITH_YOUR_API_KEY with your actual API key

  3. Update the image field in deployment.yaml to point to your registry (e.g., ghcr.io/youruser/zeroclaw:latest)

  4. Update the namespace in all files if you want a different name

  5. Optionally edit configmap.yaml to change the provider or model

  6. Apply all manifests:

    bash
    oc apply -f deploy-k8s/
    

The real .yaml files are gitignored so your secrets and customizations stay local.

Verification

Check that the pod is running and the route is accessible:

bash
oc -n zeroclaw get pods
oc -n zeroclaw get route zeroclaw

Test the health endpoint:

bash
ROUTE=$(oc -n zeroclaw get route zeroclaw -o jsonpath='{.spec.host}')
curl -sf "https://${ROUTE}/health"

Send a test message:

bash
curl -X POST "https://${ROUTE}/webhook" \
  -H "Content-Type: application/json" \
  -d '{"message": "hello, what model are you?"}'

Configuration

The shape of configmap.yaml's embedded config.toml follows the canonical Provider Configuration → Minimal working example. The sample's aliases are cloud (provider entry) and assistant (agent + risk profile) — substitute your own. Common edit points:

SettingPath in config.tomlSample value
Modelproviders.models.anthropic.cloud.modelclaude-sonnet-4-20250514
Temperatureproviders.models.anthropic.cloud.temperature0.7
Autonomy levelrisk_profiles.assistant.levelsupervised
Agent → provider linkagents.assistant.model_provideranthropic.cloud

To swap to a different provider type (OpenAI, OpenRouter, Ollama, etc.), replace the [providers.models.anthropic.cloud] block with a [providers.models.<type>.<alias>] entry from providers/catalog and update agents.assistant.model_provider to match.

After editing, re-apply and restart the pod:

bash
oc apply -f deploy-k8s/configmap.yaml
oc -n zeroclaw rollout restart deployment zeroclaw

Notes

  • State is ephemeral. Both state and workspace volumes use emptyDir — agent memory and session history do not persist across pod restarts. For production, replace these with PersistentVolumeClaims.
  • Vanilla Kubernetes. The Route object is OpenShift-specific. On vanilla Kubernetes, replace route-sample.yaml with a Kubernetes Ingress targeting port 42617.

Cleanup

bash
oc delete namespace zeroclaw