Kine is an etcdshim that provides an etcd-compatible API on top of various backend datastores:
- SQL (SQLite, MySQL/MariaDB, Postgres)
- Memory (ephemeral btree)
- NATS (embedded or external JetStream)
- T4 (standalone or with S3)
- Can be ran standalone so any k8s (not just K3s) can use Kine
- Implements the subset of the etcd V3 API required by the Kubernetes API server - not intendend to be usable as a generic etcd server
- Lease: Grant
- Watcher: Watch, RequestProgress, Close
- KV: Put, Get, GetStream, Delete, Compact, Txn
- Cluster: MemberList
- Maintenance: Status
See an example.
If you want to run multiple Kine instances (or multiple K3s server nodes, using the Kine embedded in K3s) you must use an external SQL database, or NATS, or T4.
- The SQLite and Memory backends support only a single Kine instance.
- The SQLite backend does not support use of shared-cache mode without WAL journal.
- The SQLite backend does not support use of temporary or in-memory databases; use the Memory backend instead.
- The SQLite backend does not not support running multiple instances against a shared DB file; either on a single host, or on shared storage mounted by multiple hosts.
A high level flow diagram and overview of code structure is available at docs/flow.md.