Overview
Cloudflare Gateway Controller is a Cloudflare-native implementation of the Kubernetes
Gateway API. It watches GatewayClass, Gateway, and
route objects (HTTPRoute, GRPCRoute, TLSRoute) in your cluster and reconciles them into
Cloudflare-managed infrastructure — tunnels, DNS records, and certificates — so Kubernetes
stays the single source of truth for how your applications are exposed, instead of a separate
dashboard or ticket queue.
It runs in one of two operating modes, chosen per GatewayClass. Both modes can run in the
same cluster at once, on different classes.
Tunnel Mode versus DNS Mode
Section titled “Tunnel Mode versus DNS Mode”| Tunnel Mode | DNS Mode | |
|---|---|---|
| Inbound exposure | Outbound-only connection from your cluster to Cloudflare’s edge — no public ingress port, no public IP on your cluster at all | A standard public DNS record pointing at a LoadBalancer Service’s external address |
| Data plane | cloudflared, run and managed by this controller (one Deployment per tunnel) |
Envoy Gateway, a separate install this controller does not manage — the companion pattern |
LoadBalancer need |
None | Required — a cloud provider’s implementation, or MetalLB on bare metal/local clusters |
| TLS termination | Cloudflare’s edge (Universal SSL), automatic for the zone apex and first-level subdomains only — a deeper hostname (e.g. a.b.example.com) needs Advanced Certificate Manager coverage ordered manually in the Cloudflare Console, or the listener is rejected (Accepted=False, reason UnsupportedValue) |
Automatic (ACME via cert-manager, issuing Let’s Encrypt certificates via DNS-01 through Cloudflare) when no matching TLS Secret exists, or bring your own certificate Secret directly — either way, except TLSRoute passthrough listeners, which terminate at the backend Pod |
| Supported route kinds | HTTPRoute (hostname + path matching only), GRPCRoute (method.service/method.method matching only; requires http2 transport and the zone’s gRPC setting) — see Supported Features for the exact ceiling |
HTTPRoute, GRPCRoute (both full, handled natively by Envoy Gateway), TLSRoute (Passthrough mode only) — TCPRoute is not supported on this project’s current Gateway API pin |
| Conformance posture | Implements the Gateway API surface but cannot run the stock upstream conformance suite — its fixtures use hardcoded hostnames that can’t be routed through Cloudflare’s shared edge. See Supported Features for the generated feature matrix instead. | Conformant with the Gateway API GATEWAY-HTTP, GATEWAY-GRPC, and GATEWAY-TLS Core profiles, verified in CI against real Envoy Gateway |
When to choose Tunnel Mode: you don’t want any public ingress point into your cluster, or
your cluster has no LoadBalancer implementation available at all (a home lab, a restrictive
network). Cloudflare’s edge handles TLS for you.
When to choose DNS Mode: you already run a public-facing LoadBalancer and want Envoy
Gateway’s fuller route matching (header/method matching, filters, weighted backends) — DNS
Mode’s route handling is Envoy Gateway’s own, unconstrained by cloudflared’s narrower ingress
schema.
What you need, at a glance
Section titled “What you need, at a glance”Tunnel Mode:
- A Kubernetes cluster — any; Tunnel Mode has no
LoadBalanceror CNI requirement. - A Cloudflare account and a zone (domain) you control.
- A Cloudflare API token scoped for tunnel and DNS management.
DNS Mode:
- A Kubernetes cluster with a working
LoadBalancerimplementation. - cert-manager installed before the controller — only required for automatic (ACME) certificates; skip it if every listener uses a bring-your-own-certificate Secret or is plain HTTP.
- Envoy Gateway, installed and configured for this
controller’s
dns-controllername. - A Cloudflare account and a zone (domain) you control.
- A Cloudflare API token scoped for DNS management.
The Install page covers every prerequisite in full, including the exact commands. Once installed, pick a quickstart:
For how the two modes fit together architecturally — control plane versus data plane, and how this controller’s own reconciliation differs between them — see Architecture.