<p>When I extend kubernetes with api aggregation, i found the extension api server needs an instance etcd for storage, so does Kubernetes itself.</p>

<p>why can't I replace the etcd with other databases, like nosql database mongodb ?</p>

<p>why doesn't kubernetes architecture design allow people to choose other storage options ?</p>

Hongwei Liu
<p>From <a href="https://rancher.com/blog/2019/2019-01-29-what-is-etcd/" rel="nofollow noreferrer">here</a></p>
<blockquote>
<p>Since its adoption as part of <strong>Kubernetes</strong> in 2014, the Etcd community has grown exponentially. There are many contributing members including CoreOS, Google, Redhat, IBM, Cisco, Huawei and more. Etcd is used successfully in production environments by large cloud providers such as AWS, Google Cloud Platform, and Azure.</p>
<p>Etcd’s job within Kubernetes is to safely store critical data for distributed systems. It’s best known as Kubernetes’ primary datastore used to store its configuration data, state, and metadata. Since Kubernetes usually runs on a cluster of several machines, it is a distributed system that requires a distributed datastore like Etcd.</p>
<p>Etcd makes it easy to store data across a cluster and watch for changes, allowing any node from Kubernetes cluster to read and write data. Etcd’s <strong>watch</strong> functionality is used by Kubernetes to monitor changes to either the <strong>actual</strong> or the <strong>desired</strong> state of its system. If they are different, Kubernetes makes changes to reconcile the two states. Every read by the kubectl command is retrieved from data stored in Etcd, any change made (kubectl apply) will create or update entries in Etcd, and every crash will trigger value changes in etcd.</p>
</blockquote>
