cloudflare-tunnel

by serge.logvinov

Helm chartv0.3.2App 2026.11.2Verified publisher

Cloudflared tunnel deployment

About this chart

cloudflare-tunnel

Cloudflared tunnel deployment

Homepage: https://github.com/sergelogvinov/helm-charts

Maintainers

NameEmailUrl
sergelogvinovhttps://github.com/sergelogvinov

Source Code

Network policy

Set networkPolicy.enabled: true to create an egress NetworkPolicy. It allows cluster DNS on TCP/UDP port 53, tunnel connections on TCP/UDP port 7844, and HTTPS on TCP port 443. Tunnel and HTTPS traffic can reach IPv4 destinations outside 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC1918), and any IPv6 destination on these ports.

networkPolicy:
  enabled: true
  extraEgress:
    - to:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: default
          podSelector:
            matchLabels:
              app: origin
      ports:
        - port: 8080
          protocol: TCP

Enforcement requires a CNI that supports NetworkPolicy. Other policies selecting these pods can allow additional traffic because Kubernetes NetworkPolicies are additive. The policy is disabled by default.

Values

KeyTypeDefaultDescription
replicaCountint1
image.repositorystring"cloudflare/cloudflared"
image.pullPolicystring"IfNotPresent"
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]
nameOverridestring""
fullnameOverridestring""
argslist[]Args for the container entrypoint
envsobject{}Secret environment variables. Uses if not set the envSecretName
envlist[]Deployment environment variables
ingresslist[]Cloudflare ingress rules. refs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/configuration-file/#how-traffic-is-matched
serviceAccountobject{"annotations":{},"create":false,"name":""}Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
podAnnotationsobject{}Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podSecurityContextobject{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}Pod Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsUser":65532,"seccompProfile":{"type":"RuntimeDefault"}}Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
networkPolicyobject{"dns":{"ipBlocks":[],"namespaceSelector":{"matchLabels":{"kubernetes.io/metadata.name":"kube-system"}},"podSelector":{"matchLabels":{"k8s-app":"kube-dns"}}},"enabled":false,"extraEgress":[]}Network Policy parameters. ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
networkPolicy.enabledboolfalseEnable egress filtering: allow cluster DNS, tunnel connections, and HTTPS. Add rules for origin services using extraEgress.
networkPolicy.dns.namespaceSelectorobject{"matchLabels":{"kubernetes.io/metadata.name":"kube-system"}}Namespace selector for cluster DNS pods.
networkPolicy.dns.podSelectorobject{"matchLabels":{"k8s-app":"kube-dns"}}Pod selector for cluster DNS (CoreDNS and kube-dns).
networkPolicy.dns.ipBlockslist[]Additional DNS resolver CIDRs allowed on TCP/UDP port 53, for example a DNS service IP or NodeLocal DNS address.
networkPolicy.extraEgresslist[]Additional egress rules for origin services or other destinations.
resourcesobject{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
startupProbeobject{"failureThreshold":60,"httpGet":{"path":"/ready","port":"metrics","scheme":"HTTP"},"initialDelaySeconds":5,"periodSeconds":5,"successThreshold":1,"timeoutSeconds":1}This is to setup the startup probes refs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
livenessProbeobject{}This is to setup the liveness probes refs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
readinessProbeobject{}This is to setup the readiness probes refs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
terminationGracePeriodSecondsint30The time in seconds that is allowed for a tailscale node to gracefully shutdown ref: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks
useDaemonSetboolfalseUse a daemonset instead of a deployment
updateStrategyobject{"rollingUpdate":{"maxSurge":1,"maxUnavailable":1},"type":"RollingUpdate"}Controller deployment update strategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment
nodeSelectorobject{}Node labels for controller assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
tolerationslist[]Tolerations for controller assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
podAntiAffinityPresetstring"soft"Pod Anti Affinity soft/hard
podAntiAffinityPresetKeystring"kubernetes.io/hostname"
affinityobject{}Affinity for controller assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
metrics.enabledboolfalse

Deploy cloudflare-tunnel with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cloudflare-tunnel on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcloudflare-tunnel is pinned at v0.3.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply