-
Notifications
You must be signed in to change notification settings - Fork 48
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 forwarding not working with python requests library #569
Comments
From the additional info I have gathered :
|
I tried a simple example by starting an nginx web server Pod and getting the homepage with a port forward and This works as expected: # Create web server Pod
kubectl run webserver --image nginx --port 80
kubectl expose po webserver import kr8s
import requests
[svc] = kr8s.get("svc", "webserver")
with svc.portforward(remote_port=80, local_port="auto") as local_port:
resp = requests.get(f"http://localhost:{local_port}/")
print(resp.text)
# <!DOCTYPE html>\n<html>\n<head>\n<title>Welcome to nginx!</title>... # Clean up
kubectl delete svc/webserver po/webserver Given that you are also able to access Vault via a port forward it sounds like there is something specific to the Argo request you are making. The error messages you shared show the remote server not responding and The logs you shared up to the To debug this further we need a small example like the one I shared above that reproduces the issue. That way I can attach a debugger and see what is going on. |
edited my issue to provide with hopefully a reproducable kubectl cli command |
Which project are you reporting a bug for?
kr8s
What happened?
after the apply you will get an initial root token, put this token as the password in the payload and it should be reproduced
This works (with manual port-forwarding)
This does not work
Anything else?
Error Log
The text was updated successfully, but these errors were encountered: