# 向 etcd 写入

> 向 etcd 集群添加一个键值对

---

LLMS 索引： [llms.txt](/zh/llms.txt)

---

## 先决条件 {#prerequisites}

- 安装 `etcdctl`

## 步骤 {#procedure}

使用 `put` 子命令写入键值对：

```shell
etcdctl --endpoints=$ENDPOINTS put foo "Hello World!"
```
其中：
- `foo` 为键名称
- `"Hello World!"` 为用引号括起的值
