> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Dify Helm Chart

## 要求

* Kubernetes 1.24+
* Helm 3.14+
* `警告`: 如果你使用的是受限环境（如 OpenShift），请确保允许 pods 以 `root` 身份运行。

## 快速开始

### Helm Chart 仓库

你可以使用以下命令添加 Dify Helm chart 仓库：

```bash theme={null}
helm repo add dify https://langgenius.github.io/dify-helm
```

### 安装或升级

首次安装或升级 Dify 时，你可以使用以下命令：
**警告**：升级前，请确保备份你的数据库。如果升级失败，你可以快速回滚版本并恢复数据库。

```bash theme={null}
helm repo update
helm search repo dify/dify
helm upgrade -i dify -f values.yaml dify/dify
# 如果你想升级到指定版本，可以使用以下命令：
# helm upgrade -i dify -f values.yaml dify/dify --version x.x.x
```

## 高级用法

### 卸载

要卸载 Dify，你可以使用以下命令：

```bash theme={null}
helm uninstall dify
```

### 显示 Helm Chart 配置值

要了解更多关于 Helm chart 配置值的信息，你可以使用以下命令：

```bash theme={null}
helm show values dify/dify
```

### 使用 Helm 模板生成 Kubernetes YAML

你可以使用以下命令生成 Kubernetes YAML 文件：

```bash theme={null}
helm template dify -f values.yaml dify/dify > dify-k8s-template.yaml
```
