Skip to content

Controller Configuration

The controller reads its configuration from CLI flags. Every flag can also be supplied as an environment variable: uppercase the flag name and replace hyphens with underscores. When both are set, the CLI flag takes precedence. The table below lists every supported controller flag.

Terminal window
# These are equivalent:
--cloudflare-api-token=xxx
CLOUDFLARE_API_TOKEN=xxx

The Helm chart wires the credential secret and chart values into these settings for you, so most Helm users never touch them directly. They are useful when running the controller outside Helm or when injecting configuration from an external secret manager.

FlagEnvironment variableDefaultDescription
--cloudflare-api-tokenCLOUDFLARE_API_TOKEN(required)Cloudflare API token. See Cloudflare Credentials.
--cloudflare-account-idCLOUDFLARE_ACCOUNT_ID(required)Account identifier that owns the tunnel.
--cloudflare-tunnel-nameCLOUDFLARE_TUNNEL_NAME(required)Tunnel name created or reused by the controller.
--ingress-classINGRESS_CLASScloudflare-tunnelIngress class name watched by the controller.
--controller-classCONTROLLER_CLASSstrrl.dev/cloudflare-tunnel-ingress-controllerController class name used in IngressClass.spec.controller.
--log-level, -vLOG_LEVEL0Numeric log verbosity. -v is the shorthand for --log-level and accepts the same integer value.
--namespaceNAMESPACEdefaultNamespace where the managed cloudflared connector runs.
--cloudflared-protocolCLOUDFLARED_PROTOCOLautoTransport protocol used by cloudflared.
--cloudflared-extra-argsCLOUDFLARED_EXTRA_ARGS(empty)Extra arguments passed to the cloudflared command.
--cloudflared-imageCLOUDFLARED_IMAGEcloudflare/cloudflared:latestContainer image for the managed cloudflared connector.
--cloudflared-image-pull-policyCLOUDFLARED_IMAGE_PULL_POLICYIfNotPresentImage pull policy for the managed connector pods.
--cloudflared-replica-countCLOUDFLARED_REPLICA_COUNT1Number of managed cloudflared connector pods.
--cloudflared-deployment-configCLOUDFLARED_DEPLOYMENT_CONFIG(empty)Path to a JSON file with pod template customization for the managed connector Deployment.
--cluster-domainCLUSTER_DOMAINcluster.localKubernetes cluster domain used to build Service FQDNs.
--leader-electLEADER_ELECTfalseEnable leader election for high availability.
--dns-comment-templateDNS_COMMENT_TEMPLATEmanaged by cloudflare-tunnel-ingress-controller, tunnel [{{.TunnelName}}]Go template for DNS record comments. Set it to an empty string to disable comments. Available variables are {{.TunnelName}}, {{.TunnelId}}, and {{.Hostname}}.

Missing something in the docs? Open an issue