> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the ClickHouse Operator with Helm

> This guide covers installing the ClickHouse Operator using Helm charts.

This guide covers installing the ClickHouse Operator using Helm charts.

<h2 id="prerequisites">
  Prerequisites
</h2>

* Kubernetes cluster v1.28.0 or later
* Helm v3.0 or later
* kubectl configured to communicate with your cluster

<h2 id="install-helm">
  Install Helm
</h2>

If you don't have Helm installed:

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

Verify installation:

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

<h2 id="install-the-operator">
  Install the Operator
</h2>

<Note>
  By default Helm chart deploys ClickHouse Operator with webhooks enabled and requires cert-manager installed.
</Note>

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

<h3 id="from-oci-helm-repository">
  From OCI Helm repository
</h3>

Install the latest release

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

Install a specific operator version

```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>
```

<h3 id="from-local-chart">
  From Local Chart
</h3>

Clone the repository and install from the local chart:

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

<h3 id="watch-namespaces">
  Watch specific namespaces
</h3>

By default the operator watches all namespaces. Set `controller.watchNamespaces` to limit it.
Entries are rendered as templates, so `{{ .Release.Namespace }}` resolves to the release namespace
and can be combined with static namespaces:

```yaml theme={null}
controller:
  watchNamespaces:
    - "{{ .Release.Namespace }}"
    - team-a
```

On the command line, `--set` parses braces as list syntax, so use `--set-json` (Helm v3.10 or later):
`--set-json 'controller.watchNamespaces=["{{ .Release.Namespace }}"]'`.

To watch only the release namespace with namespace-scoped RBAC:

```yaml theme={null}
controller:
  watchNamespaces:
    - "{{ .Release.Namespace }}"
rbac:
  namespaced: true
```

With `rbac.namespaced: true` the manager's permissions become a Role/RoleBinding in the release namespace,
so watching other namespaces requires cluster-scoped RBAC (the default).

<h3 id="configuration-options">
  Configuration options
</h3>

For advanced configuration options, refer to the [values.yaml](https://github.com/ClickHouse/clickhouse-operator/blob/main/dist/chart/values.yaml) file in the Helm chart
