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
| Name | Description | Value |
|---|---|---|
image.repository | Registry to pull the image from | docker.io/cloudflare/cloudflared |
image.tag | Image tag | 2022.11.0 |
image.imagePullPolicy | Image pull policy | IfNotPresent |
kind | Deployment type - deployment or daemonset | deployment |
replicaCount | Number of replicas (if using kind: deployment) | 1 |
nodeSelector | Select which nodes to run on | {} |
tolerations | Define tolerations | {} |
affinity | Define node affinity | {} |
topologySpreadConstraints | Define topology spread constraints | {} |
resources | Define pod resource requests/limits | {} |
strategy.type | Define roll out strategy | RollingUpdate |
disruptionBudget.enabled | Enable PodDisruptionBudget | true |
disruptionBudget.maxUnavailable | Maximum unavailable pods | 1 |
tunnelID | Argo Tunnel ID | "" |
auth.accountTag | Argo Tunnel Account Tag | "" |
auth.tunnelName | Argo Tunnel Tunnel Name | "" |
auth.tunnelSecret | Argo Tunnel Secret | "" |
ingress | Ingress 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcloudflared is pinned at v1.0.22 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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