Skip to content

[Reverted Setup Linux] Enable system reset on Linux hosts #3043

Description

@krotz-dieter

Problem

k2s system reset is blocked for Linux-only installations by the command handler, although the Linux system provider already implements reset through kubeadm reset -f.

This is an inconsistent command/provider boundary: a native implementation exists but is unreachable from the CLI. It also leaves Linux users without the standard recovery path after a failed or incomplete installation.

Proposed Solution

Allow k2s system reset to call System.Reset on Linux hosts. Define Linux reset semantics clearly, including cleanup of Kubernetes control-plane state, CNI interfaces, and K2s runtime configuration where appropriate.

Preserve the existing Windows behavior and do not route Linux execution through PowerShell.

Relevant Files

  • cmd/k2s/cmd/system/reset/reset.go
  • cmd/k2s/cmd/system/reset/network.go
  • internal/provider/system_linux.go
  • internal/setuporchestration/orchestrator_linux.go

Acceptance Criteria

  • k2s system reset is available after k2s install --linux-only.
  • The command invokes the Linux provider rather than returning a Linux-only availability error.
  • Reset cleans up the kubeadm control plane and reports any cleanup failures clearly.
  • k2s system reset network is validated and documented for Linux-host behavior.
  • Unit tests prove Linux command routing and preserve the existing Windows behavior.
  • An integration test verifies that a reset Linux host can be installed again cleanly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions