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

perf: validate credentials and check apiserver connectivity before starting kubelet #5982

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

cameronmeissner
Copy link
Collaborator

@cameronmeissner cameronmeissner commented Mar 4, 2025

What type of PR is this?

What this PR does / why we need it:

we recently discovered that in cases where the kubelet tries to begin bootstrapping its client credential before its bootstrap token has been installed into the running control plane, kubelet will attempt to retry bootstrapping with a very aggressive exponential backoff which ends up causing node registration to be unnecessarily delayed

this PR adds a new script which is responsible for validating that kubelet's credential, whether that be a kubeconfig or bootstrap-kubeconfig, is valid and can be used to successfully authenticate with the apiserver via kubectl auth whoami. this script will be run as a further ExecStartPre specified within the kubelet.service unit file.

we already validate that the apiserver is up and reachable before starting kubelet to ensure that we avoid falling into the same trap of kubelet's backoff loop

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none

@cameronmeissner cameronmeissner changed the title perf: validate credentials before starting kubelet to reduce startup latency perf: validate credentials and check apiserver connectivity before starting kubelet Mar 6, 2025
Copy link
Contributor

github-actions bot commented Mar 6, 2025

No changes to cached containers or packages on Windows VHDs

Copy link
Contributor

github-actions bot commented Mar 8, 2025

No changes to cached containers or packages on Windows VHDs

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

Successfully merging this pull request may close these issues.

2 participants