Ceph Storage
This section documents how to operate K2s Ceph storage per workload OS.
- Linux workloads use CephFS through the
ceph-cephfsStorageClass. - Windows workloads use Ceph over SMB through the
ceph-smbStorageClass (enabled with-w).
Important behavior
storage cephandstorage smbare mutually exclusive. Only one can be enabled at a time.- Disabling Ceph removes the entire addon-provisioned Ceph cluster, including OSD resources and Ceph-backed PVs created by this setup.
Default configuration profile
The default Ceph configuration is intentionally minimal:
clusterHost.node=kubemasterosdHostscontainskubemaster- single OSD with
osdSizesInGb: [6]
Use this as a starter profile and scale out for production-like performance.
Cross-OS guidance
For Linux + Windows workload environments:
- Enable Ceph with
-w. - Use
ceph-cephfsprovisioner for Linux workloads. - Use
ceph-smbprovisioner for Windows workloads.
Offline guidance (addon export/import)
For air-gapped environments, export and import the Ceph addon before enable:
k2s addons export "storage ceph" -d C:\exports
k2s addons import "storage ceph" -f C:\transfer\addons.oci.tar
If clusterHost.node is a Linux worker node, include --node <worker-node-name> on import so offline Ceph bootstrap prerequisites are staged on the target Ceph host.
Performance recommendation
To get better Ceph storage performance, it is recommended to:
- create multiple OSDs with higher storage capacity,
- distribute OSDs across multiple OSD nodes,
- keep OSD placement beyond only the master/control-plane node.
This improves throughput, balancing, and resilience.
Ceph reference documentation
- CephFS volumes and subvolumes
- Ceph OSD architecture overview
- Ceph hardware recommendations
- Ceph upstream documentation portal
Configure cluster host and OSD hosts
Edit addons/storage/ceph/config/ceph-config.json.
clusterHost.nodedefines where Ceph cluster bootstrap runs.osdHostsdefines OSD nodes and OSD sizing.osdSizesInGbcan set per-OSD sizes;osdSizeInGbcan set one common size for that host.
{
"clusterHost": {
"node": "kubemaster",
"os": "linux",
"osdCrushChooseleafType": 0,
"monCount": 1,
"mgrCount": 1,
"mdsCount": 1
},
"osdHosts": [
{
"node": "kubemaster",
"os": "linux",
"osdCount": 1,
"osdSizesInGb": [6]
},
{
"node": "cephosdnode1",
"os": "linux",
"osdCount": 2,
"osdSizesInGb": [10, 10]
}
]
}
Add Additional Node for Ceph (OSD Host or Cluster Host)
You can add extra nodes for OSD expansion, and you can also bootstrap Ceph on an additional Debian node.
Add node before enabling Ceph
- Add the node to K2s.
- Update Ceph config:
- set
clusterHost.nodeto that node (to install Ceph there), or - add that node in
osdHosts(to use it for OSDs).
- set
- Enable Ceph.
If OSD config is prepared first and then the node is added, Ceph uses that node during setup.
Add node after Ceph is already enabled
- Update
osdHostsinaddons/storage/ceph/config/ceph-config.json. - Add the node to K2s.
- Reconciliation updates Ceph via
addons/storage/ceph/Update.ps1.
If Ceph is already enabled, update config and then add node; the node is attached to Ceph through the update flow.
Changing clusterHost.node after Ceph is enabled requires re-provisioning (disable and re-enable Ceph).
Choose the guide that matches your workload pattern:
For addon-level essentials, see the Ceph addon README in the repository at addons/storage/ceph/README.md.