I have two separate accounts, referred to as TLD_A and TLD_B.
I have logged into Cloudflared using the cloudflared tunnel login command on the TLD_A account. Now, I have configured the Ingress with the following settings:
Afterwards, I can use the env HTTPS_PROXY=socks5://127.0.0.1:1234 kubectl get pods command as if nothing is out of the ordinary. Is this behavior intentional, or is it a bug?
P.S. The question above was revised with the help of ChatGPT.
Define accounts? Two separate logins to Cloudflare each containing a different domain? Or are you using account to mean 2 different domains in the same account?
And in that account TLD_B is in an active state and there is a DNS entry for k8s which is a CNAME to something.cfargotunnel.com? And that something.cfargotunnel.com is a tunnel listed in the account which has TLD_A?
TLD_B is an active domain.
k8s.TLD_B has CNAME of cfargotunnel.com but should be listed on TLD_B’s account. Nothing share between these domains except the owner (its me).
Without doing cloudflared tunnel login I can still run cloudflared access tcp --hostname _k.TLD_B --url 0.0.0.0:1234 and connect to my service.
I though Cloudflare Tunnel would have some kind of prevention such as “I must login and have a right to proxy” but its not. So, its still a security hole to expose k8s server to outside world using Cloudflare tunnel follow this tutorial. Connect through Cloudflare Access using kubectl · Cloudflare Zero Trust docs