k3s embedded SQLite datastore constraint for multi‑node high availability
0 reputation · 24 Apr 2020, 06:31 UTC
k3s embedded SQLite datastore constraint for multi‑node high availability
The goal is to run a k3s control plane with at least two server nodes so that the API server remains available if one node fails.
In a default single‑node installation k3s stores its data in an embedded SQLite file on the local disk, which works for development but does not allow concurrent write access from multiple server processes.
When a second server node is added, the SQLite database cannot be shared over network storage, leading to lock errors and API server crashes, and there is no documented method to make the SQLite file safely accessible to all nodes.
What are the supported alternatives for the datastore in a production HA setup? Can SQLite be used with a shared volume without risk of corruption? What operational impact does switching to an external datastore such as etcd have on cluster upgrades and backups?