Deploy Crawdad as a sidecar container in your Kubernetes pods. The sidecar shares the pod's network namespace, so your agent connects to the proxy port on localhost — 7748 for Anthropic (7747 OpenAI, 7746 Google). Port 7749 is the management/health API, not for agent traffic.
kubectl create secret generic crawdad-secret \ --from-literal=license-key=crd_live_YOUR_KEY
spec:
containers:
- name: agent
image: your-agent-image:latest
env:
- name: ANTHROPIC_BASE_URL
value: "http://localhost:7748" # proxy port; OpenAI: 7747, Google: 7746
- name: crawdad-sidecar
image: crawdad/sidecar:latest
env:
- name: CRAWDAD_LICENSE_KEY
valueFrom:
secretKeyRef:
name: crawdad-secret
key: license-key
- name: CRAWDAD_BIND
value: "0.0.0.0"
ports:
- containerPort: 7748 # Anthropic proxy (agent traffic); OpenAI 7747, Google 7746
- containerPort: 7749 # management + health
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "64Mi"
cpu: "200m"
readinessProbe:
httpGet:
path: /v1/health
port: 7749
initialDelaySeconds: 2
periodSeconds: 10
livenessProbe:
httpGet:
path: /v1/health
port: 7749
initialDelaySeconds: 5
periodSeconds: 30
Containers in the same Kubernetes pod share a network namespace. Your agent connects to the proxy port localhost:7748 (7747 OpenAI, 7746 Google), same as running on a single machine; the readiness and liveness probes hit the management/health API on 7749. All scanning happens inside the sidecar container. Content stays within the pod by default.
By default the sidecar runs in Monitor mode and needs no extra privileges. To run in Enforce mode, where an iptables default-deny egress lock binds the agent to the proxy path (all other egress, including UDP/QUIC, denied), the sidecar container needs the NET_ADMIN capability. Because pod containers share a network namespace, an Enforce egress lock governs the whole pod's egress, so scope the pod to the governed agent accordingly. See the Enforce mode guide.
The Crawdad sidecar uses under 64MB RSS and minimal CPU. The recommended limits above are conservative, adjust based on your traffic.
The sidecar exposes GET /v1/health which returns {"status":"ok"}. Use this for both readiness and liveness probes. The readiness probe ensures your agent doesn't start until the sidecar is ready.
A complete deployment YAML is included in the Crawdad distribution under deploy/kubernetes-sidecar.yaml. Contact contact@getcrawdad.dev for assistance.