soluble-ai / kubetap

Kubectl plugin to interactively proxy Kubernetes Services with ease
https://soluble-ai.github.io/kubetap/
Apache License 2.0
524 stars 44 forks source link

Tap doesn't work with Rancher downstream clusters #24

Open zilmarr opened 11 months ago

zilmarr commented 11 months ago

Description

1 - Installed kubetap using krew 2 - Tried to tap an existing service running inside a cluster created and managed by Rancher 3 - Got the error below:

 Error: error upgrading connection: error creating request: parse "https://rancher.mydomain.local%2Fk8s%2Fclusters%2Fc-wagrt/api/v1/namespaces/hmg/pods/app-56fd855877-4fg7c/portforward": invalid URL escape "%2F"

Kubectl commands to create reproducable environment / deployment

Using against a cluster created/managed by Rancher:

kubectl tap on app-service -p 8080 --https --browser -n hmg

Screenshots or other information

Go version: Kubernetes client version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"linux/amd64"} Kubernetes server version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.13", GitCommit:"49433308be5b958856b6949df02b716e0a7cf0a3", GitTreeState:"clean", BuildDate:"2023-04-12T12:08:36Z", GoVersion:"go1.19.8", Compiler:"gc", Platform:"linux/amd64"}

nathangiuliani commented 11 months ago

@zilmarr just run it without the --browser or --port-forward options. The tap will be set up, and you can do the port forward yourself - kubetap even gives you the command to run.