-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make port forward local port default to the remote port #505
Comments
Hmm, nvm seems to be working I was just missing the local port (which I thought would default to the remote port). |
Maybe we should rename this issue to "Make port forward local port default to the remote port". Could you share a code example of exactly the snippet you are using so we can reproduce the same result and write a test for the fix? |
Sure, the snippet was roughly this:
I think k8s defaults to having the local port be the same as the remote port but I could be wrong? |
So I've done a quick check locally with # Start a Pod that is exposing a port
kubectl run nginx --image nginx --port 80
# Port forward and only specify the remote port
kubectl port-forward po/nginx 80
# This binds remote port 80 to port 80 locally
# Port forward and specify an empty local port
kubectl port-forward po/nginx :80
# This binds to a random port locally
# Port forward and specify a local port
kubectl port-forward po/nginx 8080:80
# This binds to port 8080 locally So the current behaviour in |
After thinking on this a bit I feel if the I've opened #506 to fix this. |
Which project are you reporting a bug for?
kr8s
What happened?
Synchronous port forwards do not appear to be working. It looks like it is b/c the the start method tries to use run
run_forever
in a thread. butrun_forever
is async:Anything else?
No response
The text was updated successfully, but these errors were encountered: