talira

Run Kubernetes on MySQL, Postgres, sqlite, not etcd

open sourceApache-2.0self-hostablefree

Kine is an etcd shim (its name stands for "Kine is not etcd"): it serves the subset of the etcd v3 API that the Kubernetes API server needs and stores the data in SQLite, MySQL or MariaDB, PostgreSQL, memory, NATS JetStream or T4. K3s embeds it, which is how a single K3s server runs on SQLite, but it also runs standalone in front of any Kubernetes. Several Kine instances (or K3s servers) need an external SQL database, NATS or T4 for high availability; SQLite and the memory backend support a single instance.

Problems it solves

  • run the Kubernetes control plane on a Postgres or MySQL database we already operate instead of etcd
  • a single-node Kubernetes server that keeps its state in one SQLite file
  • highly available k3s servers backed by a managed SQL database
  • avoid running and backing up a three-node etcd cluster for a small Kubernetes setup
  • store Kubernetes state in NATS JetStream
  • an etcd-compatible endpoint for kube-apiserver in front of a relational database
  • back up our Kubernetes control plane the same way we back up our SQL databases
  • a lightweight Kubernetes for a Raspberry Pi or edge device without etcd's disk and memory needs
  • store a Kubernetes cluster's state in a managed MySQL or Postgres service from our cloud provider
  • test Kubernetes controllers against an in-memory datastore

Features

  • etcd v3 API subset for kube-apiserver: KV, Watch, Lease, Cluster MemberList, Maintenance Status
  • SQL backends: SQLite, MySQL/MariaDB, Postgres
  • memory backend (ephemeral btree)
  • NATS backend (embedded or external JetStream)
  • T4 backend (standalone or with S3)
  • runs standalone for any Kubernetes, or embedded in K3s
  • multiple instances for high availability with an external SQL database, NATS or T4

Limitations

  • Not a general-purpose etcd server: it implements only the parts of the etcd v3 API the Kubernetes API server needs1
  • No high availability with SQLite: the SQLite and memory backends support a single Kine instance1

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what Kine does.

  1. etcd A distributed, reliable key-value store for the most critical data of a distributed system

Compare Kine with the top 3