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

The frequency of Kubelet querying apiserver #51

Open
z1cheng opened this issue Nov 5, 2023 · 0 comments
Open

The frequency of Kubelet querying apiserver #51

z1cheng opened this issue Nov 5, 2023 · 0 comments

Comments

@z1cheng
Copy link

z1cheng commented Nov 5, 2023

Thanks for your repo to help understand Kubernetes!

Have a question about the frequency of Kubelet querying apiserver:

It queries Pods from kube-apiserver every 20 seconds (this is configurable)

https://github.com/jamiehannaford/what-happens-when-k8s/blob/master/README.md?plain=1#L256C72-L256C148

Kubelet has fileCheckFrequency and httpCheckFrequency config, the default: 20 seconds, but there is no config for apiserver query frequency. And kubelet creates a reflector to do listAndWatch for pods resource, which can first list all items and then constantly watch items on a long connection with apiserver, so even if kubelet has a frequency config, it can't take effect :(

See code: https://github.com/kubernetes/kubernetes/blob/v1.14.0/pkg/kubelet/kubelet.go#L277C1-L309C3 and kubelet command-line doc https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#synopsis (sorry, not found v1.14 doc)

Please let me know if any different opinions :)

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

No branches or pull requests

1 participant