-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
kubernetesClient does not support setting connection pool size. #6374
Comments
This depends on the underlying http client implementation. More than likely you'll need to override the specific http client factory to do this. Can you elaborate on which http client you are using and why you need to set the pool size? |
I use the DefaultKubernetesClient(Config config) method to create a k8s client. I found that the client may continuously timeout when disk performance is poor or CPU frequency is unstable. I actively catch the exceptions that occur when using the client and close the connection, but it does not work. The exception continues until it recovers on its own, and the HTTP connection remains open during the fault period and is not closed as expected. I am not sure if the exception is related to this connection issue, so I want to set the connection pool size to 0 to create a new connection for each request. |
kubernetes version: 1.21.14 io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred. E0927 21:46:41.993869 1 wrap.go:54] timeout or abort while handling: GET "/api/v1/pods" |
Do you mean version 4.9? If so please update to a much later version. As for the timeout exception, I can't really say at first glance what that is related to, and especially if changing the connection pool size would matter. Please reproduce whatever behavior you are seeing the latest version of the client as possible and re-open or re-create an issue. |
Okay, I will upgrade to the latest version . Thank you for your support. |
I want to set the size of the connection pool, but the kubernetesClient does not support it. DefaultKubernetesClient(Config config) and DefaultKubernetesClient(HttpClient httpClient, Config config) create objects that look very different in implementation, how should I set the connection pool size?
The text was updated successfully, but these errors were encountered: