-
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
Client not able to reach Cluster API behind a proxy if using multiple client function #1967
Comments
/assign @FlorianJDF |
Hello all, Cheers |
I got the same issue with new_client_from_config() # Impossible to set a proxy with a new client from config
my_api_client=config.new_client_from_config(my_kubeconfig_file)
my_api_client.configuration.proxy="MY_HTTP_PROXY"
eks_client = dynamic.DynamicClient(my_api_client)
api_deployment = eks_client.resources.get(api_version="apps/v1", kind="Deployment")
api_deployment.get(namespace='MY_NAMESPACE',name='MY_DEPLOYMENT')
# >> Proxy error |
Any update on this? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
you could try this solution. config.load_kube_config()
k8s_config = client.Configuration().get_default_copy()
k8s_config .proxy = "MY_HTTP_PROXY"
client.Configuration().set_default(k8s_config)
client.CoreV1Api().list_namespace() |
Hello all,
What happened (please include outputs or screenshots):
I need to access multiple k8s clusters at once, all behind a proxy.
To be able to reach many k8s clusters at once, I use the function new_client_from_config_dict.
Unfortunatly this do no allow to have an HTTP(S) PROXY set.
This #333 solution do not work because the new_client_from_config_dict is not using the _default object in kube_client.Configuration
What you expected to happen:
Been able to set a proxy variable or inject a client configuration when using the function new_client_from_config_dict
How to reproduce it (as minimally and precisely as possible):
Environment:
kubectl version
):python --version
)pip list | grep kubernetes
)Thanks,
The text was updated successfully, but these errors were encountered: