Repository navigation
Clarify that node-label is re-applied on every start - #619
Merged
Merged
Conversation
--node-taint is only applied at registration, but --node-label is patched onto the Node object every time K3s starts (configureNode -> updateMutableLabels). Labels are added or updated, never removed. Describe both options separately and note that labels changed with kubectl must also be changed in the K3s configuration. Signed-off-by: Anton Plaksin <onton.p@gmail.com>
brandond
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Node Labels and Taints" sections in
advanced.mdandcli/agent.mdsay that both--node-labeland--node-taintare only applied at registration time. That is true for taints, but not for labels:--node-taintis passed to the kubelet as--register-with-taintsand only takes effect when the node registers.--node-labelis also patched onto the Node object every time K3s starts (configureNode->updateMutableLabelsinpkg/agent/run.go). Labels are added or updated, never removed.In practice this means a label removed or changed with
kubectlcomes back on the next K3s restart if it is still in the configuration, and a label removed from the configuration stays on the node. The CLI help text already hints at the difference ("Registering and starting kubelet with set of labels" vs "Registering kubelet with set of taints").This PR describes both options separately in
cli/agent.md, adds a short summary with a link inadvanced.md, and notes that labels changed withkubectlmust also be changed in the K3s configuration.The same fix for the RKE2 docs: rancher/rke2-docs#700