cloudflare-operator icon indicating copy to clipboard operation
cloudflare-operator copied to clipboard

Reach API-Server through cloudflared

Open bgervan opened this issue 1 year ago • 1 comments

Hi, did anyone try to reach api server service with cloudflared?

I tried with added hostnames to https://docs.k3s.io/cli/server#listeners tls-sans, but no luck. Still getting Unable to connect to the server: x509: certificate signed by unknown authority

What am I missing? Tried with tls and without.

apiVersion: networking.cfargotunnel.com/v1alpha1
kind: TunnelBinding
metadata:
  name: cloudflare-tunnel-apiserver
subjects:
  - name: kubernetes
    spec:
      fqdn: kubernetes.example.com
      noTlsVerify: true
tunnelRef:
  kind: ClusterTunnel
  name: k3s-cluster-tunnel

bgervan avatar Nov 05 '23 11:11 bgervan

I just spun up a k8s cluster with docker desktop, installed the operator and applied your exact config. It works fine for me. The below reponse is indeed from the K8s API server. Screenshot 2023-11-05 at 7 38 02 AM

adyanth avatar Nov 05 '23 15:11 adyanth