Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Port forwarding doesn't work for kubernetes #12459

Closed
TheAnachronism opened this issue May 5, 2022 · 4 comments · Fixed by #12462
Closed

Port forwarding doesn't work for kubernetes #12459

TheAnachronism opened this issue May 5, 2022 · 4 comments · Fixed by #12462

Comments

@TheAnachronism
Copy link

Expected behaviour:
If I try to port-forward something with let's say kubectl port-forward my-pod 8080 my local port 8080 should get forwarded to the port 8080 on that pod.

Current behaviour:
I get the error error: error upgrading connection: missing parameter MaxLeases. This is the case for port-forwarding to a pod or to a service.

Bug details:

  • Teleport version
    • client: Teleport v9.2.0 git:v9.2.0-0-gc7db54496 go1.17.9
    • server/cluster inside kubernetes: Teleport v9.2.0 git:v9.2.0-0-gc7db54496 go1.17.9
  • Recreation steps
    • Installing teleport with helm inside kubernetes
    • Log in on a client and try to port-forward something

Found out a bit later:
The same behaviour is if I try to create an interactive shell to a pod, like this: kubectl exec -it my-pod -- bash.

@stereobutter
Copy link

stereobutter commented May 5, 2022

I experience a similar issue. The error message I get from something like kubectl port-forward my-pod 8080 is just error: error upgrading connection: error upgrading connection.

The issue appears to be due to teleport v9.2 and/or a conflict between v9.1 and v9.2. In my setup when I use v9.1 for the auth+proxy server and v9.2 with the other node that I want to expose k8s from, I get the issue above. When using v9.1 for both everything works as expected.

Precise version numbers

auth+proxy: Teleport v9.1.1 git:v9.1.1-0-gb0129ff5e go1.17.9
k8s(working): Teleport v9.1.3 git:v9.1.3-0-g4314e09eb go1.17.9
k8s(not working): Teleport v9.2.0 git:v9.2.0-0-gc7db54496 go1.17.9

@TheAnachronism
Copy link
Author

TheAnachronism commented May 5, 2022

OK, I haven't tried downgrading yet but I guess I'll go back to 9.1.3 until this issue is resolved.
I already had a hunch that it was version 9.2.0 as I just upgraded today.

@TheAnachronism
Copy link
Author

OK, I just verified on version 9.2.1, and it's fixed.
Thank you very much for the swift response and fix.
👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants