Skip to content

cfgate.iocfgate v0.2.0-alpha.11 · Release documentation

Basic Example

Single tunnel exposing one service via Cloudflare.

Terminal window
# 1. Install Gateway API + cfgate
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.6.2/standard-install.yaml
kubectl apply -f https://github.com/cfgate/cfgate/releases/latest/download/install.yaml
# 2. Create credentials
kubectl create secret generic cloudflare-credentials \
-n cfgate-system \
--from-literal=CLOUDFLARE_API_TOKEN=<your-token>
# 3. Deploy example (edit files first)
kubectl apply -k examples/basic

Before applying, edit these files:

FileWhat to change
tunnel.yamlSet accountId to your Cloudflare account ID
dns.yamlSet zones[].name to your domain
httproute.yamlSet hostnames[] to your subdomain
Terminal window
kubectl get cloudflaretunnel -n cfgate-system
kubectl get cloudflarednses -n cfgate-system
kubectl get httproute -n demo
curl https://echo.yourdomain.com
Terminal window
kubectl delete -k examples/basic