Skip to content
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

Throttling warning causes incorrect behavior #32

Open
vbasem opened this issue Jun 24, 2021 · 2 comments · May be fixed by #69
Open

Throttling warning causes incorrect behavior #32

vbasem opened this issue Jun 24, 2021 · 2 comments · May be fixed by #69
Labels

Comments

@vbasem
Copy link

vbasem commented Jun 24, 2021

I was wondering why my wait for was never finishing and while debugging in the container I saw that my API server was returning a warning message on top of the POD infos:

I0624 10:31:01.428761     375 request.go:668] Waited for 1.181153768s due to client-side throttling, not priority and fairness, request: GET:https://<server>/apis/rbac.authorization.k8s.io/v1?timeout=32s
NAME                            READY   STATUS    RESTARTS   AGE
<pod>   1/1     Running   0          173m
<pod>   1/1     Running   0          173m
<pod>   1/1     Running   0          173m

the script seems to be parsing the first line and ends up not detecting the pod status.

I might have some time to prepare a quick fix but for now I will leave an issue report here.

Basem Vaseghi [email protected], Daimler TSS GmbH, legal info/Impressum

@groundnuty
Copy link
Owner

groundnuty commented Aug 30, 2021

I guess it's thanks to all those stderr to stdout redirections ;-(
Removing then should make errors visible container logs and also fix the problem.

If you happen to have a spare moment, you're welcome to check if that really solves the problem and I will include that fix in the next release.

@slinkel-vkb
Copy link

slinkel-vkb commented Apr 5, 2022

We were able to solve this issue simply by mounting an empty dir at /.kube

In our case, the wait-for container was not running as root, so kubectl could not create a cache dir in its $HOME (i.e. /)

a detailed explanation can be found at: https://jonnylangefeld.com/blog/the-kubernetes-discovery-cache-blessing-and-curse

tl;dr: kubectl cannot cache global resource definitions if ~/.kube is not present/writable, so it ends up requesting it all the time, so it will get throttled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants