Skip to content

kubectl apply is slow due to client side throttling #1722

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

Open
Rick-van-Dam opened this issue Feb 22, 2025 · 4 comments
Open

kubectl apply is slow due to client side throttling #1722

Rick-van-Dam opened this issue Feb 22, 2025 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@Rick-van-Dam
Copy link

Rick-van-Dam commented Feb 22, 2025

I constantly see these kind of messages when doing kubectl apply -f - --server-side --force-conflicts --prune --applyset=<applyset>:

Waited for 14.1888454s due to client-side throttling, not priority and fairness, request: GET:https:<url>

Likely this is due to having a decent amount of custom CRD's which causes me to hit the client side limit.

I tried to find a way to increase the client limits but these seem to be not configurable. My server can easily handle more (and if not I could simply add more powerful hardware). How to disable or increase this limit when using the cli? Having to wait is annoying and costly. I think its fine to have somewhat conservative limits by default but they should be configurable in a way.

@Rick-van-Dam Rick-van-Dam added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 22, 2025
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 22, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

@ardaguclu
Copy link
Member

Thanks for filing an issue. Limits are hardcoded in

return genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag().WithDiscoveryBurst(300).WithDiscoveryQPS(50.0)
. Incorrect configurations may overload the API server. So that these values are not configurable and I don't think, we'd want to change this behavior.

@Rick-van-Dam
Copy link
Author

Rick-van-Dam commented Mar 1, 2025

Everyone's situation is different so having this configurable would better fit everyones situation.

I don't think preventing ppl to overload the api server is a good reason to hardcode this. If someone really wants to he could just make a custom client to do so. A warning in the documentation with some recommended values should probably be enough.

Even better would be to apply some server side control of this actually by sending back a 429.

@mpuckett159 mpuckett159 added triage/needs-information Indicates an issue needs more information in order to work on it. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it. labels Mar 26, 2025
@mpuckett159
Copy link
Contributor

I'll bring it up that the next sig-cli meeting, but because it is really easy to brick your cluster due to over loading the API server I don't think that we will move forward with making these options configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

4 participants