-
Notifications
You must be signed in to change notification settings - Fork 296
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
Port Forward example not working #297
Comments
It started working if I close the listener in while loop.
Can someone please look into my suggestion? I feel example need modification. |
I encountered this as well, you just need to change var demux = new StreamDemuxer(webSocket); to var demux = new StreamDemuxer(webSocket, StreamType.PortForward); |
@blushingpenguin
So I think it's necessary to close listener after every request full-fill. Do you have better solution? |
I don't see what Chrome's behaviour has to do with .NET's HttpClient? As it is the port forward sample is actually broken -- the stream isn't demuxed appropriately and includes random binary garbage which would explain why your browser isn't loading what you are port fowarding correctly. What's wrong with your code apart from that I couldn't say without seeing it. |
@blushingpenguin I am using same example as it is. |
Just to be clear, is this port-forwarding example the equivalent to running the following from the command line? kubectl port-forward <pod-name> 80:8080 --namespace "default" |
yours is localhost:80 -> pod 8080 |
I am using Port forward example where I need to forward the port of running service. I have service running inside pod on port 3122.
When I redirect it to 8080. The url is localhost:8080 and has UI but I don't see full UI. Only I can see the service name mentioned in Title bar of browser.
Debug:
Coming always false
Encoding.ASCII.GetString(bytes,0,bytesRec).IndexOf("<EOF>") > -1
But if I execute same using kubectl command then it works perfectly fine.
kubectl port-forward service/dbdashboard 8080:3122 -n my_namespace
Note: k8s cluster is not installed on my system. I am using k8s cluster which is installed on Azure cloud.
The text was updated successfully, but these errors were encountered: