-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Upgrade request required when running exec command with python-kubernetes client #409
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
Comments
hmmmmmmm.... |
@dulek do you have some time to re-patch please? i thought i had tests in there |
This commit reapplies PR kubernetes-client#120 that was removed by kubernetes-client#353. Below is the original commit message. inspired by the POC from @chekolyn * Adds a new requirement on websocket-client * Add a new class WSClient that uses WebSocketApp from the websocket-client. * Make sure we pass Authorization header * Make sure we honor the SSL settings in configuration * Some of the code will get overwritten when we generate fresh classes from swagger definition. To remind us added a e2e test so we don't lose the changes * Added a new configuration option to enable/disable failures when hostnames in certificates don't match Fixes kubernetes-client#58 Fixes kubernetes-client#409
This commit reapplies PR kubernetes-client#120 that was removed by kubernetes-client#353. Below is the original commit message. inspired by the POC from @chekolyn * Adds a new requirement on websocket-client * Add a new class WSClient that uses WebSocketApp from the websocket-client. * Make sure we pass Authorization header * Make sure we honor the SSL settings in configuration * Some of the code will get overwritten when we generate fresh classes from swagger definition. To remind us added a e2e test so we don't lose the changes * Added a new configuration option to enable/disable failures when hostnames in certificates don't match Fixes kubernetes-client#58 Fixes kubernetes-client#409
#410 is the commit. I was however unable to verify it as connection is now failing with "Reason: Handshake status 404". |
I can run from the command line: But when I run the following code in python
Full error messages send: 'GET /api/v1/namespaces/production/pods/secret-pod/exec?command=%5B%27cat+%2Fdata%2Fbusybox%2Fpassword%27%5D&stderr=True&stdin=False&stdout=True&tty=False HTTP/1.1\r\nHost: 192.168.42.218:8443\r\nAccept-Encoding: identity\r\nContent-Type: application/json\r\nauthorization: Bearer heoJMu0hqlrLWNJ2lV9MsaIWp1kPuKvwPhmhcmj9-Kg\r\nAccept: /\r\nUser-Agent: Swagger-Codegen/4.0.0/python\r\n\r\n' |
Is there any status update on this? Has anyone figured out a workaround? |
I found this issue mentioned (and apparently solved) over here: #526
You can then manipulate that pipe using the technique from the example code My issue is that I'm still getting an error message when I run it inside a pod in the cluster -
I'll let you know if I find the fix ;-) |
The fix was I upgraded from Python 2 to Python 3 and the hostname message went away, and I can confirm the |
for anyone ending up here Googling: connect_get_namespaced_pod_attach "message":"Upgrade request required"
read more: |
@scher200 you also need to upgrade the ssl on python to make it work, definitely you need kubernetes stream but thats one aspect you also need to upgrade SSL and on my mac its a bit complicated not sure about windows/linux |
here it worked out of the box with linux.. |
the older openssl versions still cause this issue using Streams type "openssl version" I have you also may want to do and you can set |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Even after applying all the standard configurations and examples, applying the solutions of @scher200 , I am getting a bad request.
The traceback is:
|
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I'm having the same issue with a way more simpler setup: }, When I just ask for my pod details, it does work - so my Auth and Cert should be fine: |
Hi all, |
This is because a websocket connection is required if you want to exec into a pod. |
I saw this image already appeared in #58 and was solved, but now it's broken again in 4.0
The text was updated successfully, but these errors were encountered: