burakince / cloudflare-tunnel-example

cloudflare tunnel example for home raspberry pi cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudflare Tunnel Example

Cloudflare Tunnel example for home Raspberry PI cluster. Please use the K3s Ansible script and install your home Raspberry Pi cluster. This installation is not part of this example. Also, Nima Mahmoudi's blog post and Cloudflare's official K8s example could be helpful to develop your solution. Unfortunately, Cloudflare currently doesn't support arm64 and arm architectures in their official docker hub repository. I cross-compiled the official source code and deployed them to my docker hub public repository. The official cloudflared docker hub repository started to support arm64 architecture and I adapt to it. Feel free to use this helm chart. Cheers.

Install Cloudflare CLI

brew update && brew install cloudflared

Login to Cloudflare and Create a Tunnel

cloudflared tunnel login
cloudflared tunnel create pi-cluster

Install cloudflare tunnel to your raspberry pi cluster by helm chart

Please run ./run.sh command and it will deploy the solution to your target Kubernetes cluster.

or

Pelase copy your tunnel credential to files folder and run following command.

helm upgrade --install \
  --namespace cloudflare \
  --create-namespace \
  cloudflare \
  ./charts/cloudflared

You can also have a values.yaml flie like below and keep your settings in it. All /values.yaml file changes ignored in this repository.

replica:
  allNodes: true

tunnelConfig:
  name: "pi-cluster"
  protocol: quic

ingress:
  - hostname: "*.example.com"
    service: http://traefik.kube-system.svc.cluster.local:80

  - service: http_status:404

Cloudflare Tunnel Screen

Cloudflare Tunnel

Pi Cluster Screen

Pi Cluster

About

cloudflare tunnel example for home raspberry pi cluster

License:MIT License


Languages

Language:Smarty 66.1%Language:Shell 33.9%