> For the complete documentation index, see [llms.txt](https://viva.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://viva.gitbook.io/project/cun-chu/etcd.md).

# Etcd

### 项目地址

{% embed url="<https://github.com/etcd-io/etcd>" %}

### 官方文档

{% embed url="<https://etcd.io/docs/>" %}

### 快速上手

启动etcd

```
docker run -d -p 2379:2379 --rm quay.io/coreos/etcd:v3.3.19 /usr/local/bin/etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379
```

列举所有key

```
ETCDCTL_API=3 etcdctl get --prefix / --keys-only
```

查看资源占用

```
ETCDCTL_API=3 etcdctl --write-out=table endpoint status
```

### Q\&A

空间超额处理办法mvcc: database space exceeded

{% embed url="<https://www.centos.bz/2018/06/etcd%E6%95%B0%E6%8D%AE%E5%BA%93%E5%BC%82%E5%B8%B8%EF%BC%9Amvcc-database-space-exceeded%E8%A7%A3%E5%86%B3/>" %}

分布式锁

{% embed url="<https://tangxusc.github.io/blog/2019/05/etcd-lock%E8%AF%A6%E8%A7%A3/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://viva.gitbook.io/project/cun-chu/etcd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
