storage

default: local-path provisioner

k3s includes local-path provisioner. it dynamically creates hostPath-backed persistent volumes on the node.

pros:

  • zero extra moving parts
  • good enough for one node
  • easy to inspect on disk

cons:

  • node-bound
  • manual migration if the node changes
  • no replication

recommended data root: /srv/k3s/volumes.

alternative: openebs local pv

openebs local pv provides a more formal local pv abstraction with node affinity and clearer pv lifecycle semantics. it can make later multi-node local-disk scheduling cleaner, but it still does not replicate data.

use openebs local pv later if:

  • we add worker nodes
  • we want named storage classes per disk/path
  • we need better pv lifecycle control than local-path

not v1: longhorn

longhorn is useful for replicated storage across nodes. on one node it mostly adds complexity without fault tolerance.