-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Connection Refused when using client behind coporate proxy to connect to AWS Cluster #549
Comments
Can you show us your kubeconfig file |
Weirdly enough, I went into the source code of the ApiClient to see if I could kick start the thing and gain more info about what the problem may be. I was able to make the client work behind my proxy by doing the following in the init function of the api_client.py module:
edit : The copy of the code looks pretty bad, but I just added to line 65 of the file api_client.py : Setting the proxy via the specified methods or launching my code in an environment with the correctly proxy variables set had no effect, where as this "fixed" the problem immediately |
Ok. So I ended up doing the following (this time without editing the sources)
Not sure if it was indicated in the docs to do a load_kube_config() and use that to solve the proxy issue, but I could not see anything of the kind |
Check this #333 (comment) |
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. |
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. |
This doesn't work for me. Only changing the ApiClient source as described in the previous comment does. |
So I've been using the client for about a week, and I have to say I love it and what it can do. However, I've noticed that when using the client at work I receive the following errors despite the fact that all kubectl commands work :
2018-06-18 11:20:15,250 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff4dc6f69d0>: Failed to establish a new connection: [Errno 111] Connection refused',)': /api/v1/namespaces/default/status 2018-06-18 11:20:15,254 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff4dc6f6910>: Failed to establish a new connection: [Errno 111] Connection refused',)': /api/v1/namespaces/default/status 2018-06-18 11:20:15,258 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff4dc6f6a90>: Failed to establish a new connection: [Errno 111] Connection refused',)': /api/v1/namespaces/default/status HTTPSConnectionPool(host='<ip_address>', port=443): Max retries exceeded with url: /api/v1/namespaces/default/status (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff4dc6f6a10>: Failed to establish a new connection: [Errno 111] Connection refused',))
I've tried using the default config.load_kube_config() function. I've also tried to set the proxy using :
conf = client.Configuration() conf.http_proxy_url = <proxy> config.load_kube_config(client_configuration=conf)
The latter command fixes the host as 'localhost' rather than the IP of my AWS cluster
The text was updated successfully, but these errors were encountered: