feat: add K3s node detection to kube endpoint#771
Merged
Conversation
Add detection for K3s control-plane nodes using the node-role.kubernetes.io/control-plane label. K3s single-node clusters are treated the same as microk8s, with the node counted as both master and worker. This enables the kube endpoint to work with K3s distributions, resolving "No masters found" and "No workers found" errors. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
Author
|
@k-rister if this works, I assume we will have to backport to the stable releases, since the upcoming CI changes would be using runners with k3s, and those stable releases use the same CI. There may be an earlier rickshaw PR we have to backport as well. |
Contributor
|
Yeah, we will probably have to backport this, but I don't think it will be to all 4 releases. I'll have to look at which one(s). |
Contributor
I think it's just going to be 2025.4 and 2026.1 |
k-rister
approved these changes
Mar 19, 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.
Summary
node-role.kubernetes.io/control-planelabelProblem
When using K3s, the kube endpoint was failing with "No masters found" and "No workers found" errors because it only had node detection logic for standard k8s and microk8s distributions.
Solution
Added K3s node detection following the same pattern as microk8s (single-node treated as both master and worker), just using K3s's
node-role.kubernetes.io/control-planelabel instead of microk8s'snode.kubernetes.io/microk8s-controlplanelabel.Test plan
🤖 Generated with Claude Code