Usage documentation for the Salt formula that installs and manages k0s.
The formula installs the k0s binary, generates controller configuration,
creates a systemd unit through k0s install controller or k0s install worker,
and manages the service.
| Feature | Status |
|---|---|
Install the k0s binary to /usr/local/bin/k0s |
supported |
single role |
supported |
controller role |
supported |
worker role |
supported |
Generate /etc/k0s/k0s.yaml |
supported for single and controller |
| Generate a worker join token on the controller | supported through the standalone k0s.token state |
| Manage the systemd service | supported |
| Full k0s removal | not implemented yet; k0s.uninstall is a placeholder |
Supported binary download architectures: amd64, arm64, aarch64.
- quickstart.md - minimal setup for single-node, controller, and worker nodes.
- pillar.md - the full pillar contract and examples.
- states.md - available state files and their behavior.
- operations.md - tokens, upgrades, service management, and limitations.
- testing.md - local unit and integration tests.
- stages/ - historical development-stage documentation.
k0s:
role: single
version: 'v1.30.2+k0s.0'
config:
spec:
telemetry:
enabled: falseApply it:
salt '<minion-id>' saltutil.sync_states
salt '<minion-id>' saltutil.sync_utils
salt '<minion-id>' state.apply k0sCheck the node:
/usr/local/bin/k0s version
systemctl status k0scontroller
/usr/local/bin/k0s kubectl get nodesThe formula uses custom state modules from _states/ and shared utility
functions from _utils/:
k0s_controller.installedk0s_worker.installed
Salt synchronizes custom state modules and utility modules from _states and
_utils directories at the Salt file-root level. These directories are at the
repository root, following the SaltStack community convention. Synchronize the
modules after deploying the formula:
salt '<minion-id>' saltutil.sync_states
salt '<minion-id>' saltutil.sync_utilsThe formula must be available in Salt file roots so that salt://k0s/...
resolves to the k0s/ directory, and the custom modules must be available
as _states/ and _utils/ for saltutil.sync_states and
saltutil.sync_utils.