Skip to content

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

External Target Example

A/AAAA DNS records pointing to an external IP, without a Cloudflare Tunnel.

This example creates DNS records via CloudflareDNS in ExternalTarget mode. No tunnel, gateway, or HTTPRoute is needed; ExternalTarget mode is standalone DNS management.

Terminal window
# 1. Install cfgate (if not already installed)
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 dns.yaml first)
kubectl apply -k examples/external-target

Before applying, edit dns.yaml:

FieldWhat to change
spec.cloudflare.accountIdSet to your Cloudflare account ID
spec.cloudflare.secretRef.nameName of your credentials Secret (default: cloudflare-credentials)
spec.zones[].nameSet to your domain
spec.source.explicit[].hostnameSet to hostnames in your domain
spec.externalTarget.valueSet to the target IP address
Terminal window
kubectl get cfdns -n cfgate-system
dig app.example.com
dig api.example.com
Terminal window
kubectl delete -k examples/external-target