Repository navigation
Labels
Description
Friction
devops-cli installs kubectl 1.37.1, and the homelab cluster runs Kubernetes 1.31 (k3s v1.31.4+k3s1). kubectl is supported only within one minor of the API server, so every kubectl call devops-cli makes against the homelab is six minors outside the skew policy, and nothing says so. Kubernetes 1.31 is also past upstream end of life. The k3s upgrade itself belongs to the homelab repository (dan-petty/homelab#3, which pins k3s_version and owns make upgrade); devops-cli's part is to detect and document the skew, not to pin an end-of-life kubectl.
Evidence
Live, read-only, 2026-10-17:
- All three nodes (, , ) report kubeletVersion v1.31.4+k3s1 and containerd 1.7.23-k3s2.
Repo:
src/devops_cli/tools_lock/tools.lock:28pins[binary.kubectl] version = "1.37.1"; helm is 4.3.0 and the Python client iskubernetes==36.0.3(pyproject.toml:25).src/devops_cli/k8s/service.py:156,190-191already callsVersionApi.get_codefor reachability, but discards the version.K8sClusterStatusResult.server_versionexists (src/devops_cli/models/k8s.py:438).devops k8s doctor(src/devops_cli/k8s/doctor.py:490,diagnose) has node, volume, pod and event rules and no version rule; itsSnapshotalready holds the nodes, whosestatus.nodeInfo.kubeletVersiongives each kubelet's version.- No README section names a supported Kubernetes range or the skew policy. No devops-cli issue covers it (searched: kubectl skew, kubectl version, tools.lock kubectl).
- The homelab repository pins
k3s_version: "v1.31.4+k3s1"(ansible/inventory/group_vars/k3s_cluster.yaml:3), and its docs: document branch protection and branch management standards #3 plans the minor-by-minor upgrade.
Remedy
- Tests first (
tests/k8s/test_doctor*.pyor beside the existing doctor tests, on the shared fake cluster): a snapshot whose server minor is more than one away from the locked kubectl minor yields one warning finding naming both versions and the supported range; a snapshot within one minor yields none; kubelets older than the API server by more than the Kubernetes skew policy allows yield a finding per node. - In
doctor.py, add the server version toSnapshot(from theVersionApi.get_codecall the service already makes, added toplan_doctor_requestsso--dry-runlists it) and a version-skew rule. Parse versions withpackaging.version.Version(already a dependency), read the kubectl version fromdevops_cli.tools_lock.load_tools_lock(), and keep the rule a pure function. No hand-kept table of Kubernetes releases. deploy-stackprints the same warning once before it applies anything, without failing (the skew is real but rarely breaksapply).k8s/README.mdPrerequisites: state the kubectl skew policy, thattools.locktracks a current kubectl, and that the homelab stays outside it until dan-petty/homelab#3 lands. Do not pin kubectl to 1.31 or 1.32; both are end of life and the devcontainer's minikube runs a current release.
Priority: P3. The runtime risk (runc and containerd CVEs, end-of-life minor) is tracked in dan-petty/homelab#3; this item only makes the skew visible.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Review
Activity
dan-petty commentedon Oct 18, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate addresses a version skew issue that causes kubectl to be outside the supported Kubernetes version policy.The issue is about visibility of version skew and does not introduce immediate runtime risk or security concerns.Fixing the version skew improves operational safety and clarity for users working with the cluster.The fix involves adding tests, modifying doctor logic, updating deploy-stack behavior, and updating documentation across multiple files.chore(main): release 0.6.4 (#2303)