> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 Helm 安装 ClickHouse Operator

> 本指南介绍如何使用 Helm 图表安装 ClickHouse Operator。

本指南介绍如何使用 Helm 图表安装 ClickHouse Operator。

<div id="prerequisites">
  ## 前置条件
</div>

* Kubernetes 集群 v1.28.0 或更高版本
* Helm v3.0 或更高版本
* 已将 kubectl 配置为与你的 Kubernetes 集群通信

<div id="install-helm">
  ## 安装 Helm
</div>

如果您还没有安装 Helm：

```bash theme={null}
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
```

验证安装：

```bash theme={null}
helm version
```

<div id="install-the-operator">
  ## 安装 ClickHouse Operator
</div>

<Note>
  默认情况下，Helm 图表会在启用 webhooks 的情况下部署 ClickHouse Operator，并且要求已安装 cert-manager。
</Note>

```bash theme={null}
helm install cert-manager oci://quay.io/jetstack/charts/cert-manager -n cert-manager --create-namespace --set crds.enabled=true
```

<div id="from-oci-helm-repository">
  ### 通过 OCI Helm 仓库
</div>

安装最新版本

```bash theme={null}
    helm install clickhouse-operator oci://ghcr.io/clickhouse/clickhouse-operator-helm \
       --create-namespace \
       -n clickhouse-operator-system
```

安装特定版本的 Operator

```bash theme={null}
    helm install clickhouse-operator oci://ghcr.io/clickhouse/clickhouse-operator-helm \
       --create-namespace \
       -n clickhouse-operator-system \
       --set manager.image.tag=<operator version>
```

<div id="from-local-chart">
  ### 从本地图表安装
</div>

克隆代码仓库，并通过本地图表安装：

```bash theme={null}
git clone https://github.com/ClickHouse/clickhouse-operator.git
cd clickhouse-operator
helm install clickhouse-operator ./dist/chart
```

<div id="configuration-options">
  ### 配置选项
</div>

如需了解高级配置选项，请参阅 Helm 图表中的 [values.yaml](https://github.com/ClickHouse/clickhouse-operator/blob/main/dist/chart/values.yaml) 文件
