> For the complete documentation index, see [llms.txt](https://book.eru.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.eru.dev/installation/management.md).

# Management

Eru 完全是旁路控制，因此我们只需要添加好 Pod 和 Node 后就可以操作 Eru 集群了。

### 准备工作

Eru 提供了 [cli](https://github.com/projecteru2/cli) 来操作集群。cli 可以通过容器运行：

```
docker run -it --rm \
  --net host \
  --name eru-cli \
  projecteru2/cli \
  /usr/bin/erucli <PARAMS>
```

也可以直接把 binary 放在 `$PATH` 下作为命令使用，通过 `make-rpm` 能生成 rpm 包并安装在机器中。具体的子命令和参数可以使用 `erucli -h` 获得

### 创建 Pod

```
docker run -it --rm \
  --net host \
  projecteru2/cli \
  erucli pod add ${POD_NAME}
```

在安装好 Core 之后，集群实际上还是不能启动的，需要先注册 Pod。Eru 反对实体富容器 Pod，但通过这种形式可以把多种相关容器限定在一组机器中组成机器层面上的**富容器**。

### 添加节点

创建好 Pod 之后就可以开始给 Pod 添加节点了，在被添加的已经配置好 https docker 的机器上，执行以下命令：

```
docker run -it --rm --privileged \
  --net host \
  -v /etc/docker/tls:/etc/docker/tls \
  projecteru2/cli \
  erucli node add ${POD_NAME}
```

这样节点就会加入到目标 Pod 中，然后就可以进行容器编排和部署了。就是在注册的时候时候建议冗余一些 CPU 和内存给 OS 本身。比如 4Core 的机器写 3Core，128G 内存注册为 120G 等。


---

# 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, and the optional `goal` query parameter:

```
GET https://book.eru.dev/installation/management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
