-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ingress + Cloudflare Tunnel #15
Comments
You can point your cloudflared to your service directly, or to the ingress. I am working on an operator to automate it which is currently in alpha. |
I'm struggling to get this to work atm and looking at the website it seems Tunnels is moving to a new part of the site. And also seems client configured tunnels aren't able to "migrated" to the new setup? Could this change be the source of my isses? |
Currently there are two types of tunnels, one managed on the client side and one with the API/UI. Both of them work in the same way. What are the issues you are referring to? |
Need this one too using Traefik. is it like this ? https://community.cloudflare.com/t/examples-ingress-cloudflared-configuration-when-exposing-via-ingress-kubernetes/331844 |
There's helm chart in here: https://github.com/cloudflare/argo-tunnel-examples/tree/master/helm/cloudflare-tunnel Also this particular for setting tunnel in kubernetes is using manifest, not chart, and they are different. Because manifest is using k8s secret with secret string in it, while in chart you can just pass that secret string through helm-chart params, and in helm-chart template it create a k8s secret by itself. I'm not sure if this very secure, but at least in terraform you can just pass an argument from resource of the tunnel to a helm-chart param, so it won't be exposed, but when listing deployments in kubectl this secret will be exposed, which I think it not a very good idea. |
@mozarik could you get it to work? struggling with the same problem now but with kong-ingress-controller |
@Leo310 i pivoted to use nginx |
I've actually managed it to work because someone pushed helm-chart to this repo, although in my humble opinion it should be moved to But anyway, I'm using terraform for managing charts sorry, but you can easily make your own json config file, and you also need to download whole chart because there's no way to access it in here, I mean that folder in this git repo is not a helm repo sadly. Tried to contact cloudflare for some actions but for now things are staled.
Once you have this tunnel you don't need to specify every virtual host in it, it doesn't replace an ingress controller. You can use wildcards in the rules for example |
I now also got it to work but I had a different problem. The domain I used to create the tunnel and dns record with (this guide) wasnt wildcarded so cloudflare didnt route any subdomains to the cloudflared pod. It actually works with this yaml and your tweaked ingress rules. I used this rule for my kong-proxy:
|
I ran in to similar issues due to the complexity of parsing the
From this I was able to work out how to do it in Terraform. I've created two modules, one uses Terraform |
Could you provide an example of how to use Ingress + Cloudflare tunnel?
I guess it is possible to avoid using the Cloud Provider Load Balancer solution if all traffic goes through Cloudflare Tunnel, right?
You can provide the example using Ingress Nginx OR Traefik OR any solution that allows defining custom routes for specific services, for example:
https://github.com/webmakaka/Microservices-with-Node-JS-and-React/blob/master/10_Testing_Isolated_Microservices/k8s/ingress-controller.yaml#L12-L16
The text was updated successfully, but these errors were encountered: