Skip to content
GitHub

Flareway: Gateway API on Cloudflare Tunnel

Flareway turns a Kubernetes Gateway into a Cloudflare Tunnel, runs HTTPRoute rules in Envoy, and verifies Access at the origin, with no inbound ports.

Cloudflare Tunnel exposes a cluster without inbound firewall ports or public IPs: cloudflared dials out to Cloudflare’s edge and carries requests back. On its own, cloudflared routes only by hostname and an unanchored path regex. Its ingress rules cannot match methods, headers, or query parameters, and they cannot rewrite, redirect, mirror, or split traffic by weight.

  • Full HTTPRoute routing behind the tunnel. Method, header, and query matches, rewrites, redirects, mirroring, timeouts, CORS, and weighted splits work through the tunnel without a second proxy for you to run. HTTP routing
  • Access enforced at the edge and origin. Attach an AccessApplication to a listener or route: Flareway creates the Cloudflare Access application and policy, then verifies the Access JWT again inside the cluster, so a request that did not pass Access is refused at the origin. You never copy an AUD tag by hand. Security model
  • Private services over WARP, same Gateway. Mark a listener Private and WARP devices reach the Service through the same Gateway, HTTPRoute, and AccessApplication, with Envoy terminating TLS using your certificate. Virtual networks, routes, and WARP connectors are Kubernetes resources. Whether the Cloudflare edge accepts the 127.0.0.1 answer for private hostnames has not been verified live; see Limits. Private services over WARP
  • Fails closed on shared clusters. A namespace can use only the hostnames, zones, and exposures the platform granted it. Deleting a policy never makes a protected route public, existing Cloudflare objects are never taken over by name, and Programmed means traffic has converged. Security model

The routing features Flareway claims passed the Gateway API conformance suite in a local run through Envoy. GatewayClass.status.supportedFeatures lists 35 features: 3 Core and 32 Extended. The conformance report states what that run covered.

Each Gateway gets one CloudflareTunnel and one data-plane Deployment. The Gateway names its tunnel through the standard infrastructure.parametersRef, with no annotations.

  • cloudflared dials out to Cloudflare’s edge over QUIC or HTTP/2 and forwards each hostname to Envoy over loopback. It carries transport only.
  • Envoy runs the HTTPRoute rules that the controller streams to it over xDS (Delta ADS).
  • For a Gateway with private listeners, a CoreDNS sidecar answers private hostnames with 127.0.0.1, so WARP traffic also passes through Envoy.
Four layers: Internet and WARP clients, the Cloudflare edge with edge TLS and private network routes, an outbound tunnel through a sealed cluster boundary while inbound is blocked, and the Kubernetes data-plane pod feeding Services and backend Pods

How Flareway works covers listeners, TLS, Access, Direct mode, and the full object map.

Rendering the published chart needs no cluster and no Cloudflare credentials. You need Helm 4.3 or a compatible Helm 3 client.

Terminal window
helm template flareway oci://ghcr.io/isac322/charts/flareway \
--namespace flareway-system \
--set gatewayClass.create=true \
--set gatewayClass.config.accountRefName=example-account

The output contains the controller Deployment, RBAC, Services, and NetworkPolicies, plus GatewayClass/flareway because of gatewayClass.create=true and its GatewayClassConfig/default, which names the example-account CloudflareAccount. Add --include-crds to also render the Flareway CRDs. gatewayClass.create defaults to false so that an install cannot silently take ownership of an existing GatewayClass.

You need a Kubernetes cluster with the Gateway API v1.7.0 Standard CRDs, Helm, a Cloudflare account with a scoped API token, and a DNS zone in that account for public hostnames. Then follow the guides in order:

  1. Install
  2. Connect Cloudflare
  3. Expose a Service
Flareway version Gateway API Standard CRDs Kubernetes API / client-go Envoy data plane cloudflared connector
v0.4.0 - v0.5.0 v1.7.0 (backward-compatible with v1.6.x) v1.37 (client-go v0.37.1) distroless-v1.40.0 2026.10.2
v0.3.3 v1.6.3 v1.37 (client-go v0.37.1) distroless-v1.39.3 2026.10.0
v0.1.0 - v0.3.1 v1.6.2 v1.37 (client-go v0.37.0) distroless-v1.39.0 2026.9.0

A Flareway controller built for Gateway API v1.7.0 remains backward-compatible with clusters running Gateway API v1.6.x Standard CRDs for all v1.6.x resources and fields. Gateway API v1.7.0 Standard CRD features such as HTTPRoute.spec.rules[].retry require the v1.7.0 CRDs installed on the cluster.

Flareway fits when you want standard Gateway and HTTPRoute resources in front of Cloudflare Tunnel, Access policies declared next to the routes they protect, private services over WARP, or several namespaces sharing one Cloudflare account under explicit grants.

Check these boundaries first:

  • The controller runs as one replica with leader election.
  • HTTPRoute is the only route kind. A listener whose allowedRoutes.kinds names GRPCRoute, TLSRoute, TCPRoute, or UDPRoute reports ResolvedRefs=False with reason InvalidRouteKinds. For TCP, SSH, or RDP origins, use a Direct tunnel.
  • The controller does not claim these 11 Extended features: ClusterTrustBundle, GatewayAddressEmpty, GatewayAddressRoutability, GatewayAddressRoutabilityCluster, GatewayBackendClientCertificate, GatewayFrontendClientCertificateValidation, GatewayFrontendClientCertificateValidationInsecureFallback, GatewayListenerFilters, GatewayPort8080, GatewayStaticAddresses, and ListenerSet.
  • Cloudflare’s edge limits still apply: it waits 100 seconds for response headers (up to 6,000 on Enterprise), caps request bodies by plan, and closes WebSockets after 100 seconds idle. It does not serve redirects to ports other than 80 and 443 on public hostnames.

Limits lists every boundary and what is not yet verified.

Next: How Flareway works.

Copyright 2026 Byeonghoon Yoo. Licensed under the Apache License, Version 2.0. See LICENSE for details.