cloudflared

by mhamzahkhan

Helm chartv1.0.22App 2024.6.1Verified publisher

Cloudflare Tunnel client

About this chart

Cloudflare Tunnel Helm Chart

This is a Helm chart for installing cloudflared into a Kubernetes cluster. The basic usage is:

TL;DR

$ helm repo add mhamzahkhan https://charts.hamzahkhan.com/
$ helm install cloudflared mhamzahkhan/cloudflared

Parameters

NameDescriptionValue
image.repositoryRegistry to pull the image fromdocker.io/cloudflare/cloudflared
image.tagImage tag2022.11.0
image.imagePullPolicyImage pull policyIfNotPresent
kindDeployment type - deployment or daemonsetdeployment
replicaCountNumber of replicas (if using kind: deployment)1
nodeSelectorSelect which nodes to run on{}
tolerationsDefine tolerations{}
affinityDefine node affinity{}
topologySpreadConstraintsDefine topology spread constraints{}
resourcesDefine pod resource requests/limits{}
strategy.typeDefine roll out strategyRollingUpdate
disruptionBudget.enabledEnable PodDisruptionBudgettrue
disruptionBudget.maxUnavailableMaximum unavailable pods1
tunnelIDArgo Tunnel ID""
auth.accountTagArgo Tunnel Account Tag""
auth.tunnelNameArgo Tunnel Tunnel Name""
auth.tunnelSecretArgo Tunnel Secret""
ingressIngress rules{}

Example Deployment

tunnel-1-values.yaml

replicaCount: 2

kind: deployment

affinity:
  podAntiAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchExpressions:
              - key: app.kubernetes.io/name
                operator: In
                values:
                  - cloudflared-tunnel-1
          topologyKey: kubernetes.io/hostname

tunnelID: "00000000-0000-0000-0000-000000000000"

auth:
  accountTag: "00000000000000000000000000000000"
  tunnelName: "tunnel-1"
  tunnelSecret: "00000000000000000000000000000000000000000000"

Deploy on cluster

$ helm repo add mhamzahkhan https://charts.hamzahkhan.com/
$ helm install tunnel-1 mhamzahkhan/cloudflared --values tunnel-1-values.yaml

Deploy cloudflared with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cloudflared 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 chartcloudflared is pinned at v1.0.22 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