Skip to content

Instantly share code, notes, and snippets.

@felegy
Last active June 20, 2023 10:40
Show Gist options
  • Save felegy/e491d60dcc7674bb8296239e3522e8ee to your computer and use it in GitHub Desktop.
Save felegy/e491d60dcc7674bb8296239e3522e8ee to your computer and use it in GitHub Desktop.
Proxying Rancher UI over Cloudflare via CF tunnel with Rancher`s built-in Kubernetes api proxy

Rancher UI over Cloudflare tunnel

1. HTTPS to TCP backend for Rancher's Kubernetes API proxy /k8s/clusters

Based on the origin documentation:

https://developers.cloudflare.com/cloudflare-one/tutorials/kubectl/#configure-the-tunnel image

2. Typical HTTPS to HTTPS tunnel connection

Important to set Additional application settings / TLS / Origin Server Name to hostname of the origin request.

image

3. Order of the rules is important

Because the first rule is more extensive than the second, so the correct order is as follows:

  1. rule HTTPS to TCP
  2. rule HTTPS to HTTPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment