Skip to content

Configuration

K0s reads its config from the path passed to -c at install time, or generates defaults if none is provided. The default location is /etc/k0s/k0s.yaml.

Generate the default config:

Terminal window
k0s config create > k0s.yaml

Key sections:

  • spec.api: API server bind address and port
  • spec.storage: etcd or kine (SQLite/MySQL/Postgres) backend
  • spec.network: CNI provider, pod CIDR, service CIDR
  • spec.extensions.helm: Helm chart extensions k0s deploys automatically
  • spec.workerProfiles: kubelet configuration overrides

Partial configs work. K0s merges your file with its defaults at startup.

K0s stores all runtime data in /var/lib/k0s/. This includes etcd data, kubelet state, containerd images, and certificates. Back up this directory if you need cluster recovery.