Varnish Gateway¶
Why Varnish Gateway?¶
All the routing capabilities of the Gateway API, with the speed and flexibility of Varnish.
-
Conformance tested
Passes the Gateway API conformance test suite. Standard HTTPRoute matching, header and query filters, path types, and weighted traffic splitting.
-
Zero VCL generation for routing
HTTP routing is driven by live, in-memory routing tables derived from HTTPRoutes and EndpointSlices — not by VCL. Route and backend changes apply in milliseconds, no VCL compile.
-
Built-in dashboard
Real-time monitoring with live event stream, backend health, virtual host overview, and heartbeat visualization.
-
Custom VCL when you need it
HTTPRoutes cover the spec. Drop into VCL for custom caching, rewriting, or request logic that goes beyond the Gateway API.
-
Multi-listener
Multiple Gateway listeners on different ports. Listener-aware routing with per-listener branching via request headers.
-
TLS termination
High-performance TLS on client and backend sides. Certificates hot-reload automatically — no pod restart.
Gateway API Conformance
Varnish Gateway passes the official Kubernetes Gateway API conformance test suite, covering HTTPRoute matching, request/response header filters, URL rewrites, redirects, and weighted traffic splitting.
How it works¶
Three components translate Gateway API resources into a running Varnish configuration.
1
Operator¶
Watches Gateway and HTTPRoute resources. Generates VCL and routing configuration. Manages the Varnish Deployment, Service, and RBAC.
2
Chaperone¶
Manages the varnishd process. Discovers backend endpoints via EndpointSlices,
merges them with the operator's routing config, and pushes the result to Ghost.
3
Ghost VMOD¶
A Rust-based Varnish module that handles all routing inside Varnish. Matches requests to backends by host, path, headers, and query parameters.
Read the architecture overview →
Install¶
Install the Gateway API CRDs:
bash
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
Install Varnish Gateway:
bash
helm install varnish-gateway oci://ghcr.io/varnish/charts/varnish-gateway \
--namespace varnish-gateway-system \
--create-namespace
Create a Gateway:
yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: varnish
spec:
gatewayClassName: varnish
listeners:
- name: http
port: 80
protocol: HTTP
Install the Gateway API CRDs:
bash
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
Deploy the operator and resources:
bash
kubectl apply -f deploy/
Full instructions are in the installation guide.
Community¶
-
GitHub
Source code, issue tracker, and releases.
-
Issues
Report bugs, request features, or browse known issues.
-
Documentation
Installation, configuration, operations, and reference.