Skip to content

Add --init-only flag to k0s controller for initialization-only mode #5650

Closed
@jakolehm

Description

@jakolehm

Is your feature request related to a problem? Please describe.

Currently, there is no built-in way to run k0s controller only for the initialization phase and then exit. Users have to start k0s controller and manually terminate it after initialization if they only want to bootstrap certificates, PKI, and configurations without running the full control plane. This makes automation and pre-initialization workflows more complex than necessary.

Describe the solution you would like

It would be great to have a --init-only flag for k0s controller, which:

  1. Runs only the initialization steps (certificates, PKI, configurations, etc.).
  2. Exits successfully once the initialization process is complete, instead of keeping the control plane running.

This would be useful for:

  • Preparing the controller node without immediately starting the full control plane.
  • Automating cluster setup in CI/CD pipelines.
  • Pre-generating assets before launching the full cluster in certain environments.

Describe alternatives you've considered

Running k0s controller and manually terminating it after initialization. This is not ideal as it requires additional scripting or manual intervention.

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions