Skip to main content
Run fracta with a local Kubernetes cluster for development and testing. kind is the recommended default — it’s reproducible, cluster-agnostic, and matches what CI uses. Docker Desktop, minikube, and k3d also work; the Makefile’s image-loading helpers handle each. Agents spawn as K8s Jobs, the gateway proxies MCP tools, and state lives in Postgres.

Prerequisites

  • A local Kubernetes cluster. kind is the recommended default (kind create cluster --name fracta). Docker Desktop Kubernetes, minikube, and k3d are also supported for image loading.
  • kubectl, make, op (1Password CLI) on PATH
  • psql for event queries (optional)
Verify:

Architecture

Agent pods connect to the gateway via HTTP MCP. The gateway proxies fracta’s own agent/graph/strategy tools, plus any MCP backend services you add to deployment/k8s/manifests/.

Quick Start

1. Initialize fracta in your project

From the root of any git repository:
This drops fracta.yaml and deployment/k8s/manifests/ (namespace, RBAC, postgres, falkordb, controlplane, gateway, auth-helpers ConfigMap stub, agent job template).

2. Apply the manifests

3. Verify pods are running

All pods should show 1/1 Running:
  • postgres-0
  • falkordb-0
  • fracta-controlplane-*
  • fracta-gateway-*

4. Reach the control plane Service from your host

The control plane is the fracta-controlplane Service on port 9090 inside the cluster. For local dev clusters:
Runs in the foreground. Opens localhost:9090 → fracta-controlplane Service. Port-forward is the canonical path on kind: kind’s LoadBalancer Services stay <pending> because there’s no cloud provisioner. For Docker Desktop, a LoadBalancer Service may publish directly without port-forward; for non-dev clusters, expose via an Ingress. In all cases, update control_plane_api.url in fracta.yaml to match. The rest of the flow is identical.

5. Connect via MCP (golden path)

The scaffolded fracta.yaml is the host-side thin-client config. Configure your AI CLI to run fracta serve from your project root:
Once the host can reach the control plane Service:
Or run directly:

Configuration

Two config files

Key differences

MCP backend transports

Each MCP backend in the gateway config needs an explicit transport. For example, if you’ve added an Elasticsearch MCP container as a Service in the cluster:
Supported transports: streamable-http (default if omitted), sse.

Secrets

You’ll need at minimum a postgres secret. Create it manually:
For agent auth credentials, populate the fracta-auth-helpers ConfigMap from deployment/auth-helpers/ — see the auth helpers section of the K8s configuration docs. For MCP backend services you add (Elasticsearch, internal services, etc.), create their secrets the same way and reference them via secretKeyRef in the corresponding Deployment manifest.

How Agent Pods Work

When you spawn an agent (via fracta_spawn or fracta spawn), fracta prepares a per-agent workspace and the K8s runtime runs it:
  1. The in-cluster control plane worker resolves the selected runtime (claude, codex, or opencode) and writes runtime-specific workspace files into the configured staging directory.
  2. The K8s backend packages those files into a ConfigMap and creates either a batch Job (fracta-agent-<task>) or, for stream mode, a persistent Pod (fracta-stream-<task>).
  3. A workspace-init init container copies the ConfigMap files into the runtime workdir, normally /workspace/agents/<task>.
  4. An optional auth Secret provides the host-seeded bearer token for the agent runtime.
  5. The main container runs entrypoint.sh, starts the strategy sidecar, and execs the selected runtime command.
  6. The runtime reads its workspace config and connects to the fracta gateway via the agent-scoped HTTP MCP endpoint.
  7. The agent discovers fracta, elastic, and vendor tools through the gateway. On completion, fracta records output and events.
The runtime-specific files currently injected into K8s agent workspaces are:

Runtime MCP Config Formats

Claude uses .mcp.json:
The "type": "http" field is required — Claude CLI uses it to select HTTP MCP transport. Codex uses .codex/config.toml:
OpenCode uses opencode.json:
The exact permission payload differs by runtime. See docs/runtime-configuration.md for the full multi-runtime configuration details.

Images

The scaffolded manifests reference ghcr.io/darkquasar/fracta:latest (the published fracta image) with imagePullPolicy: IfNotPresent. For local clusters that can pull from public registries, no extra setup is needed. For air-gapped clusters or fracta-development workflows where you’ve built a local image, load the image into your cluster runtime and edit the image: and imagePullPolicy: fields in deployment/k8s/manifests/fracta-controlplane.yaml and fracta-gateway.yaml accordingly:
Then update image: and set imagePullPolicy: Never on the relevant Deployments. After image changes, restart the Deployments:

Observability

Events in Postgres

Kubernetes Events

Gateway logs

Agent pod logs (while pod exists)

Sidecar logs (inside agent pod)

Troubleshooting

Teardown

Deletes the fracta namespace and persistent volumes.