Skip to content

feat: add K3s node detection to kube endpoint#771

Merged
atheurer merged 1 commit intomasterfrom
add-k3s-node-detection-master
Mar 19, 2026
Merged

feat: add K3s node detection to kube endpoint#771
atheurer merged 1 commit intomasterfrom
add-k3s-node-detection-master

Conversation

@atheurer
Copy link
Contributor

Summary

  • 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 (node counted as both master and worker)
  • Enables kube endpoint to work with K3s distributions

Problem

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-plane label instead of microk8s's node.kubernetes.io/microk8s-controlplane label.

Test plan

  • Verify existing microk8s support still works (CI should validate this)
  • Test with K3s clusters to confirm node detection works
  • Confirm no regression for standard k8s deployments

🤖 Generated with Claude Code

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]>
@atheurer
Copy link
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.

@k-rister
Copy link
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).

@k-rister
Copy link
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).

I think it's just going to be 2025.4 and 2026.1

@k-rister k-rister requested a review from a team March 19, 2026 10:51
@atheurer atheurer merged commit 3f029d5 into master Mar 19, 2026
868 of 875 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Crucible Tracking Mar 19, 2026
@k-rister k-rister deleted the add-k3s-node-detection-master branch March 19, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants