Embedded SQLite etcd data corruption risk in k3s-server for local integration testing
0 reputation · 25 Jan 2024, 03:04 UTC
A local single-node k3s cluster can be used to validate an integration without production cloud credentials. The documented approach relies on an auto-generated node token and a local kubeconfig, with no cloud provider credentials, IAM roles or external etcd required for a dev cluster.
The default datastore is embedded SQLite-backed etcd. This component has a documented failure condition under concurrent write load or disk pressure, with a known limitation for the single-node datastore. Node tokens grant cluster admin access and behavior is version-sensitive across k3s releases. SQLite embedded etcd is not recommended for production HA workloads and has size and concurrency limits that can surface under sustained load.
An unresolved operational decision is whether to keep the default embedded SQLite for simplicity or move to an external etcd with HA. The choice affects backup restore procedures, node recovery behavior and upgrade safety. Agent join behavior is also token and server URL sensitive, with mismatched credentials leaving the agent in NotReady.
What datastore choice balances simplicity and documented failure conditions for credential-free local integration testing? Which operational signals indicate the embedded SQLite etcd is approaching its limits in a dev cluster? What practices for node token isolation and rotation are appropriate for short-lived test clusters?