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

Set root user for k8s-kubelet explicitly (v7) #824

Merged
merged 2 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s
### Added

- Add dockerhub authentication for `kubelet`.
- Use explicitly user `root` for kubelet systemd unit.

## [7.1.2] - 2020-09-30

Expand Down
1 change: 1 addition & 0 deletions pkg/template/master_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ systemd:
Description=k8s-kubelet
StartLimitIntervalSec=0
[Service]
User=root
Copy link
Contributor

Choose a reason for hiding this comment

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

So if you don't specify it what is the user running the service?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is still the root. But without HOME env variable. Here it is explained kubernetes/kubernetes#45487 (comment)

TimeoutStartSec=300
Restart=always
RestartSec=0
Expand Down
1 change: 1 addition & 0 deletions pkg/template/worker_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ systemd:
Description=k8s-kubelet
StartLimitIntervalSec=0
[Service]
User=root
TimeoutStartSec=300
Restart=always
RestartSec=0
Expand Down