Skip to content

Instantly share code, notes, and snippets.

@s4l1h
Created March 6, 2023 22:36
Show Gist options
  • Save s4l1h/d66c67a2a46db0f65a2a033f0942fddd to your computer and use it in GitHub Desktop.
Save s4l1h/d66c67a2a46db0f65a2a033f0942fddd to your computer and use it in GitHub Desktop.
cloudflared config file for kubernetes api server.
tunnel: xxxxx
credentials-file: /root/.cloudflared/xxxxx.json
url: https://127.0.0.1:16443
no-tls-verify: true
#micro kubernetes api server port: 16443 normally it is 6443
# we need to disable "certificate-authority-data" in .kube/config.
# when we use the kubectl port-forward we will get this error message "error: error upgrading connection: Upgrade request required"
# for this error: We need to turn on websocket on (cloudflare> network) and also we need to use the cloudflare tunnel ingress websocket service which needs a hostname.
@leqduyvp
Copy link

leqduyvp commented Sep 2, 2024

Thank you for sharing this!

I'm having the same error on port-forward, can you be more specific about how to setup the tunnel to fix that error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment