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

kubelet: Add setting to change log level #2460

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Sep 26, 2022

Issue number:

Closes #1931

Description of changes:

This adds a new kubernetes.log-level setting to allow configuration of the kubelet logging verbosity. With this, an end user can turn up verbosity if they are trying to troubleshoot something, or turn down verbosity if they don't need as many log messages.

Testing done:

Created EKS cluster using development build.
Checked kubelet command line arguments from systemctl status kubelet and verified no -v setting.
Ran apiclient set -j '{"kubernetes": {"log-level": 0}}'
Ran apiclient get settings.kubernetes and verified correct value for log-level.
Checked systemctl status kubelet and verified -v 0 was one of the arguments used to launch the process.
Ran journalctl -u kubelet -f and watched output to see if any additional log messages were being emitted.
Ran apiclient set -j '{"kubernetes": {"log-level": 9}}' and checked setting with apiclient get.
Checked systemctl status kubelet and verified -v 9 was one of the arguments used to launch the process.
Ran journalctl -u kubelet -f and watched additional recurring log messages showing all activity.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@stmcginnis stmcginnis force-pushed the kubelet-log-level branch 2 times, most recently from 765497e to c435521 Compare September 27, 2022 14:32
Copy link
Member

@markusboehme markusboehme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a dependency between this PR and #2437. Whichever merges last will have to update the kubelet config template for k8s 1.24.

@markusboehme markusboehme mentioned this pull request Sep 28, 2022
5 tasks
This adds a new `kubernetes.log-level` setting to allow
configuration of the kubelet logging verbosity. With this, an end user
can turn up verbosity if they are trying to troubleshoot something, or
turn down verbosity if they don't need as many log messages.

Signed-off-by: Sean McGinnis <[email protected]>
Copy link
Member

@markusboehme markusboehme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✍️

@stmcginnis stmcginnis merged commit 3fa731b into bottlerocket-os:develop Sep 28, 2022
@stmcginnis stmcginnis deleted the kubelet-log-level branch September 28, 2022 20:04
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.

Make kubelet log verbosity configurable
4 participants