How to access K8 API via Cloudflare Tunnel
- I have a cloudflare deployment running in a k8s.
- From another machine where I have kubectl and the config file from the k8s installed, I want to run
kubectl get nodes. - I have created a Cloudflare tunnel with a public host name which points to the cloudflared in that k8s using TCP. I have also updated the host name in the kubeconfig file but the kubectl from another machine gives either
Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authorityor if I runkubectl --insecure-skip-tls-verify get nodesit gives
I think this is because the cloudflare terminates the TLS and uses its own certs to contact the origin server. Is there a way to preseve the client certs, since k8s api will need that cert to authenticate?
- From another machine where I have kubectl and the config file from the k8s installed, I want to run
