Helm chartv0.2.1App 0.9.5MITVerified publisher

Crawl4AI (LLM-friendly web crawler, REST API and MCP) for Kubernetes - gunicorn as PID 1 with Redis as a native sidecar or external, generated API token, shutdown in seconds instead of a 30s hang, memory threshold below the OOM line, non-root and read-only, horizontal scaling with external Redis, Ingress or Gateway API, and a ServiceMonitor, alerts and Grafana dashboard.

About this chart

crawl4ai

Crawl4AI (web pages to clean Markdown and structured data for LLMs and RAG, over REST and MCP) on Kubernetes, tuned for running it in production rather than with the upstream Docker defaults.

What the chart changes compared with running the image as shipped (0.9.5, same flags: 4 GiB limit, read-only root, no capabilities; measured with docker stats, each run twice):

Image entrypointThis chart
Start to ready6.0-6.9 s4.0 s
Memory after start399-483 MiB (supervisord + Redis + gunicorn)261 MiB, plus 4 MiB for the Redis sidecar
Memory after 5 crawls512-632 MiB320 MiB
Pod stop after a crawl12 s: the app hangs on shutdown and supervisord kills it after 10 s, with any in-flight crawl2.7 s, in-flight requests get gunicorn.gracefulTimeout
Reachable without a tokenno: the entrypoint binds loopback, so the Service gets connection resetstoken generated once (64 characters) and kept across upgrades
JWT signing key (/token)random per process: tokens break on restart and on every other replicagenerated once, shared by all replicas
Memory threshold for new browsers95% of the limit85%: Chromium allocates in bursts and the kernel kills at 100%
Rate limiting behind an Ingressevery client counts against the proxy's addressgunicorn.forwardedAllowIps makes it per client
Cloud advert in the logs on every startyesoff
  • gunicorn is PID 1, configured from a rendered gunicorn.conf.py instead of supervisord. It handles SIGTERM and reaps the orphaned Chromium processes. The config file also bounds a shutdown wait in the egress proxy: its stop() waits for every client connection to close, Chromium keeps its tunnels open, so after the first crawl every shutdown hung until it was killed.
  • Redis as a native sidecar (redis.mode: sidecar, the default): redis-server from the same image, so there is nothing extra to pull, loopback only, password from the chart Secret, in memory with volatile-lru so job results (which expire) can be evicted and nothing else. It starts before the API and stops after it.
  • Horizontal scaling with external Redis (redis.mode: external): job state, results and rate-limit buckets move to your Redis, so a job submitted on one pod can be polled on another (tested). Then replicaCount or the HPA (CPU, slow scale-down so pods are not removed mid-crawl), a PodDisruptionBudget and spread across nodes. The chart refuses more than one replica with the sidecar.
  • Security flags stay off and are one value each: deep crawling, Python hooks, /execute_js, crawling internal addresses (the egress guard refuses cluster Services and metadata endpoints unless features.internalUrls), the Chromium sandbox.
  • Upstream config.yml is shipped with the chart and your config is deep-merged over it, so you override two keys instead of copying 150 lines.
  • Non-root (uid 999), read-only root filesystem, sized emptyDirs for /tmp, /dev/shm, the crawl cache and the artifact store; the artifact quota follows artifacts.size.
  • Monitoring: a ServiceMonitor that sends the API token (/metrics is behind the auth gate), alerts (API down, 5xx ratio, slow crawls, memory near the limit, OOM kills) and a Grafana dashboard. Changing only monitoring values does not restart the pod.

Image

The chart uses ghcr.io/oreondev/crawl4ai-server, built in this repository from the upstream image (images/crawl4ai). The upstream image ships its whole build environment: compilers, about 20 -dev packages, kernel headers, and the GStreamer and FFmpeg libraries that Playwright's WebKit and Firefox need, although Crawl4AI only drives Chromium. It also keeps the build project with old lock files in /tmp/project, so scanners report thousands of findings for packages it never runs. The rebuild copies the same Python, packages, application and Chromium browsers onto python:3.12-slim-bookworm with only Chromium's runtime libraries and Redis, and upgrades the Python packages that have fixes within Crawl4AI's version ranges. The upstream code is not modified.

Crawl4AI 0.9.5unclecode/crawl4aighcr.io/oreondev/crawl4ai-server
Trivy findings (critical / high / medium / low)5,929 (68 / 868 / 3,210 / 1,724)481 (4 / 84 / 197 / 186)
Findings with a fix available1,7430
Size unpacked5.7 GB2.7 GB
Ready / idle memory / stop after a crawl, with this chart (3 runs each)3-12 s / 262-430 MiB / 3.4-4.7 s3-4 s / 258-262 MiB / 3.6-4.0 s

The remaining findings are Debian packages with no fixed version yet; the weekly rebuild picks fixes up as Debian publishes them. Images are signed with cosign (keyless, GitHub Actions). To use the upstream image instead, set image.repository: unclecode/crawl4ai; the tags are the same.

Install

helm repo add oreonit https://oreondev.github.io/helm-charts
helm install crawl4ai oreonit/crawl4ai -n crawl4ai --create-namespace -f crawl4ai.yaml
kubectl -n crawl4ai get secret crawl4ai -o jsonpath='{.data.CRAWL4AI_API_TOKEN}' | base64 -d

crawl4ai.yaml for a production setup on GKE with Memorystore:

redis:
  mode: external
  external:
    host: 10.20.0.3              # Memorystore for Redis
    existingSecret: crawl4ai-redis
autoscaling:
  enabled: true
  minReplicas: 2
  maxReplicas: 8

llm:
  provider: openai/gpt-4o-mini   # or anthropic/..., gemini/..., a vLLM endpoint with llm.baseUrl
secretEnv:
  OPENAI_API_KEY: ...

config:
  limits:
    wall_clock_s: 120
  crawler:
    pool:
      max_pages: 20              # pages open at once per pod; about 100-150 MiB each

gunicorn:
  forwardedAllowIps: "*"         # only the load balancer reaches the pods

ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"
  hosts:
    - host: crawl.example.com
      paths: [{ path: /, pathType: Prefix }]
  tls:
    - secretName: crawl-tls
      hosts: [crawl.example.com]

metrics:
  serviceMonitor: { enabled: true }
  prometheusRule: { enabled: true }
  dashboard: { enabled: true }

Then:

curl -s https://crawl.example.com/md -H "Authorization: Bearer $TOKEN" \
  -H 'content-type: application/json' -d '{"url":"https://example.com"}'

MCP clients connect to /mcp/sse (or /mcp/ws) with the same bearer token.

Sizing and cold starts

The image is 2.7 GB unpacked (5.7 GB for the upstream one): Chromium, Playwright and Python. On a warm node the pod is ready in about 4 seconds; on a new node the pull dominates. On GKE enable image streaming or keep a minimum of nodes with the image cached, and mirror the image into your own registry.

Memory follows open pages: crawler.pool.max_pages (40 upstream) times 100-150 MiB, plus about 300 MiB for the process. Keep resources.limits.memory above that, or lower max_pages; the memory alert and the dashboard show how close a pod gets.

Artifacts with more than one replica

Screenshots and PDFs are stored on the pod that made them and fetched later from /artifacts/<id>. With several replicas that request can land on another pod; return them inline in the response, or mount a ReadWriteMany volume with artifacts.existingClaim.

Values

KeyDefault
image.repositoryghcr.io/oreondev/crawl4ai-serveror unclecode/crawl4ai
image.tag / image.digestappVersionpin one in production
auth.apiToken / auth.existingSecretgeneratedCRAWL4AI_API_TOKEN
redis.modesidecaror external (needed for more than one replica)
redis.external.host / .port / .db / .tls / .existingSecretyour Redis
redis.taskTtlSeconds3600how long job results are kept
features.deepCrawl / .hooks / .executeJs / .internalUrls / .chromiumSandboxfalseupstream security flags
llm.provider / llm.baseUrldefault LLM for extraction and /llm
configmemory threshold 85%deep-merged over the upstream config.yml
gunicorn.threads / .timeout / .gracefulTimeout / .forwardedAllowIps4 / 1800 / 30 /one worker per pod by design
env / secretEnv / extraEnv / extraEnvFrommore variables, e.g. OPENAI_API_KEY in secretEnv
replicaCount, autoscaling.*1, offneed redis.mode: external
resources500m / 1Gi, limit 4Gi
artifacts.size / .ttlSeconds / .existingClaim1Gi / 3600 /screenshots and PDFs
shm.sizeLimit, tmp.sizeLimit, cache.sizeLimit1Gi, 2Gi, 1Gi
ingress.*, httpRoute.*offlong timeouts for crawls and streams
metrics.serviceMonitor, .prometheusRule, .dashboardoffwith thresholds errorRatio, slowRequestSeconds, memoryRatio

Everything is validated by values.schema.json.

Credits and licence

This product includes software developed by UncleCode (https://x.com/unclecode) as part of the Crawl4AI project (https://github.com/unclecode/crawl4ai). The image is rebuilt from the upstream image without changes to the Crawl4AI code.

The chart is MIT licensed and maintained by Oreon IT, a DevOps, SRE and cloud consultancy in London. If you run crawling or other AI workloads on Kubernetes and want them sized, monitored and kept up to date, that is the day job.

Deploy crawl4ai with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has crawl4ai on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcrawl4ai is pinned at v0.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply