Install
Log in to GHCR with a token that has read:packages scope, piping the token on stdin rather than passing it as an argument (avoids it landing in shell history or the process list):
echo "<your-token>" | helm registry login ghcr.io --username <your-github-username> --password-stdinCreate a kubernetes.io/dockerconfigjson Secret from that same login, in the same namespace you install the chart into, and pass it through the chart's existingimagePullSecrets value:
kubectl create secret docker-registry your-pull-secret \ --docker-server=ghcr.io \ --docker-username=<your-github-username> \ --docker-password=<your-token> \ --namespace <your-release-namespace>imagePullSecrets: [{name: your-pull-secret}]or, as a Helm --set flag (quoted, since the brackets are otherwise a glob pattern in zsh): --set 'imagePullSecrets[0].name=your-pull-secret'.
Prerequisites
Section titled “Prerequisites”-
Kubernetes >= 1.28 — the chart declares
kubeVersion: ">=1.28.0-0"and Helm refuses to install it against an older cluster. -
Gateway API v1.6.0’s standard CRDs, installed first:
Terminal window kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.6.0/standard-install.yaml -
A Cloudflare account and a zone (domain) you control, with an API token scoped per Token Scopes.
No further prerequisites. cloudflared runs entirely as a Deployment this controller creates
and manages for you — there’s no companion install and no LoadBalancer requirement.
Envoy Gateway is always required. cert-manager is required only if any listener needs an automatic (ACME) certificate — skip it if every listener uses a bring-your-own-certificate Secret or is plain HTTP. If you do need it, cert-manager must go in before the controller:
-
cert-manager, tested against v1.21.3 (see Compatibility for the full tested-version matrix — an untested version may work but hasn’t been verified):
Terminal window kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.21.3/cert-manager.yamlkubectl wait --for=condition=Available --timeout=120s deployment --all -n cert-managerThe controller checks once, at its own startup, whether cert-manager’s
CertificateCRD is registered on the cluster, and keeps that answer for its whole process lifetime — this is deliberate, since it’s what lets the controller start at all on a Tunnel-Mode-only cluster with no cert-manager installed. If you install cert-manager after the controller, it won’t notice until you restart it:Terminal window kubectl rollout restart deployment/cloudflare-gateway-controller \-n cloudflare-gateway-controller-system -
Envoy Gateway, a separate install this project does not manage (the companion pattern): it must own the DNS-mode
GatewayClassand be configured with this controller’sdns-controllername. See the DNS Mode quickstart for the exact commands.
- A working
LoadBalancerimplementation on your cluster (a cloud provider’s, or MetalLB on bare metal/local clusters).
Install the chart
Section titled “Install the chart”-
Create the namespace:
Terminal window kubectl create namespace cloudflare-gateway-controller-system -
Create the pull Secret in it (see the notice above — the image and chart are private artifacts; there’s no anonymous install path):
Terminal window kubectl create secret docker-registry ghcr-pull \--docker-server=ghcr.io \--docker-username=<your-github-username> \--docker-password=<a token with read:packages scope> \--namespace cloudflare-gateway-controller-system -
Install the chart from GHCR:
Terminal window helm install cloudflare-gateway-controller oci://ghcr.io/dreamfuse-labs/charts/cloudflare-gateway-controller --version 0.4.0 --namespace cloudflare-gateway-controller-system --set 'imagePullSecrets[0].name=ghcr-pull'
Verify
Section titled “Verify”kubectl rollout status deployment/cloudflare-gateway-controller -n cloudflare-gateway-controller-systemOnce that returns successfully, the controller is running. It has nothing to reconcile yet —
no CloudflareGatewayConfiguration, GatewayClass, or Gateway exists — so it will sit idle
until you apply one.
Next: pick a quickstart
Section titled “Next: pick a quickstart”Not sure which mode fits your setup? See Overview for the decision table.