Endo
Endo
CDCloudflare Developers
Created by Endo on 2/26/2025 in #general-help
Use Cloudflare Tunnels with Kubernetes client-go plugin
Hello, I followed this tutorial to get kubectl working from my machine to a Kubernetes pod via a tunnel and an Access application: https://developers.cloudflare.com/cloudflare-one/tutorials/tunnel-kubectl/ However, when I run kubectl get pods, Cloudflare sends me to the login page even though I have a valid token (I tested the token). From what I understand, kubectl is making the following call:
curl -v -XGET \
-H "Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList,application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json" \
-H "User-Agent: kubectl/v1.32.2 (darwin/arm64) kubernetes/67a30c0" \
'https://[domain.com]/api?timeout=32s'
curl -v -XGET \
-H "Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList,application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json" \
-H "User-Agent: kubectl/v1.32.2 (darwin/arm64) kubernetes/67a30c0" \
'https://[domain.com]/api?timeout=32s'
(I’m using a real domain), but it never provides the token at any point! Could you help me? Thanks!
3 replies