<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx" -->

---
title: How etcd works with and without Kubernetes | daily.dev
description: A deep-dive tutorial explains why Kubernetes relies on etcd as its backing database, covering the desirable traits (consistency, availability, performance,...
canonical: https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How etcd works with and without Kubernetes | daily.dev
og:description: A deep-dive tutorial explains why Kubernetes relies on etcd as its backing database, covering the desirable traits (consistency, availability, performance,...
og:url: https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx
og:image: https://api.daily.dev/og/posts/tBlSJJfVx.png
og:image:alt: How etcd works with and without Kubernetes
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How etcd works with and without Kubernetes

**[LearnKube](https://daily.dev/sources/learnkube)** · 28 min read · 0 upvotes · 0 comments

## Summary

A deep-dive tutorial explains why Kubernetes relies on etcd as its backing database, covering the desirable traits (consistency, availability, performance, change notification) that make etcd a better fit than SQL databases. It walks through the Raft consensus algorithm, sets up a 3-node etcd cluster locally, demonstrates reads/writes/watches/time-travel queries via etcdctl, simulates node failures to show quorum-based availability, and inspects how Kubernetes stores objects under the /registry prefix in protobuf format. It closes by covering k3s's use of Kine to swap etcd for SQLite, MySQL, PostgreSQL, or NATS JetStream backends.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://learnkube.com/etcd-kubernetes>

## Questions this post answers

### Why does Kubernetes use etcd instead of a SQL database like PostgreSQL for its backing store?

Kubernetes needs strong consistency, high availability, predictable performance, and real-time change notifications, and etcd is purpose-built for these traits as a strongly consistent, distributed key-value store using the Raft consensus algorithm. Traditional SQL databases optimize for large, complex datasets with joins, which Kubernetes doesn't need, and struggle to deliver high availability and consistent performance out of the box.

_daily.dev surfaces deep-dive explainers like this for engineers deciding how to architect stateful systems._

### How many node failures can a 5-node etcd cluster tolerate and stay available?

A 5-node etcd cluster tolerates 2 node failures while remaining available, since etcd requires a majority of nodes to elect a leader and commit writes. Adding an even number on top of an odd count doesn't help—3 and 4 node clusters both tolerate only 1 failure—so production etcd clusters typically use 3 or 5 nodes as a balance between availability and write-replication performance.

_teams sizing etcd clusters for production HA can find this kind of practical guidance through daily.dev._

### How does k3s let you replace etcd with SQLite or another database?

k3s uses a shim project called Kine ("Kine is not etcd") that translates etcd API calls into SQL queries, storing keys and values in a single table and converting prefix queries into SQL LIKE statements. For single-server setups SQLite is the default backend, while Kine also supports MySQL, PostgreSQL, and NATS JetStream, letting k3s avoid rewriting Kubernetes' hardcoded etcd dependency.

_developers weighing lightweight Kubernetes distributions against etcd-based clusters can track these tradeoffs on daily.dev._

## Similar posts on daily.dev

- [Operating Kubernetes at scale: a few stories from running Amazon EKS](https://daily.dev/posts/operating-kubernetes-at-scale-a-few-stories-from-running-amazon-eks-vdcgnhxcm) · The New Stack · 1 upvotes · 0 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#distributed-systems](https://daily.dev/tags/distributed-systems)

[View this post on daily.dev](https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How etcd works with and without Kubernetes","url":"https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx"},"datePublished":"2026-08-31T11:20:03.654Z","dateModified":"2026-08-31T11:20:29.211Z","description":"A deep-dive tutorial explains why Kubernetes relies on etcd as its backing database, covering the desirable traits (consistency, availability, performance,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/49e0e48e370beb4be3dbe0e205c242e4?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/49e0e48e370beb4be3dbe0e205c242e4?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"LearnKube","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"LearnKube","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/90786df1b5d44abb91a090a0b6c81517","url":"https://daily.dev/sources/learnkube"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kubernetes,distributed-systems","timeRequired":"PT28M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"LearnKube","item":"https://daily.dev/sources/learnkube"},{"@type":"ListItem","position":3,"name":"How etcd works with and without Kubernetes"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-etcd-works-with-and-without-kubernetes-tblsjjfvx#faq","mainEntity":[{"@type":"Question","name":"Why does Kubernetes use etcd instead of a SQL database like PostgreSQL for its backing store?","acceptedAnswer":{"@type":"Answer","text":"Kubernetes needs strong consistency, high availability, predictable performance, and real-time change notifications, and etcd is purpose-built for these traits as a strongly consistent, distributed key-value store using the Raft consensus algorithm. Traditional SQL databases optimize for large, complex datasets with joins, which Kubernetes doesn't need, and struggle to deliver high availability and consistent performance out of the box. daily.dev surfaces deep-dive explainers like this for engineers deciding how to architect stateful systems."}},{"@type":"Question","name":"How many node failures can a 5-node etcd cluster tolerate and stay available?","acceptedAnswer":{"@type":"Answer","text":"A 5-node etcd cluster tolerates 2 node failures while remaining available, since etcd requires a majority of nodes to elect a leader and commit writes. Adding an even number on top of an odd count doesn't help—3 and 4 node clusters both tolerate only 1 failure—so production etcd clusters typically use 3 or 5 nodes as a balance between availability and write-replication performance. teams sizing etcd clusters for production HA can find this kind of practical guidance through daily.dev."}},{"@type":"Question","name":"How does k3s let you replace etcd with SQLite or another database?","acceptedAnswer":{"@type":"Answer","text":"k3s uses a shim project called Kine (\"Kine is not etcd\") that translates etcd API calls into SQL queries, storing keys and values in a single table and converting prefix queries into SQL LIKE statements. For single-server setups SQLite is the default backend, while Kine also supports MySQL, PostgreSQL, and NATS JetStream, letting k3s avoid rewriting Kubernetes' hardcoded etcd dependency. developers weighing lightweight Kubernetes distributions against etcd-based clusters can track these tradeoffs on daily.dev."}}]}
```

