<a id="co-deploy-operator"></a>

# Deploy Confluent for Kubernetes

Deploy Confluent for Kubernetes to your Kubernetes cluster using the Confluent for Kubernetes (CFK)
bundle, which contains Helm charts, templates, and scripts for deploying
Confluent Platform to your Kubernetes cluster.

<a id="co-deploy-from-helm-repo"></a>

## Deploy CFK from Confluent’s Helm repository

### Step 1: Add the Confluent Helm repository

Add the Confluent Helm repository:

```bash
helm repo add confluentinc https://packages.confluent.io/helm
```

Expected: `"confluentinc" has been added to your repositories`

Update the repository to fetch the latest charts:

```bash
helm repo update
```

Expected: `Update Complete. ⎈Happy Helming!⎈`

### Step 2: Install CFK

Install CFK using the default configuration. The `<namespace>` must already
exist. If you haven’t created one, see [Create a namespace for CFK](co-prepare.md#co-create-namespace). Replace
`<namespace>` with the namespace where you want to deploy CFK, for
example, `confluent`:

```bash
helm upgrade --install confluent-operator \
  confluentinc/confluent-for-kubernetes \
  --namespace <namespace>
```

Expected: `Release "confluent-operator" does not exist. Installing it now.`,
followed by the message `STATUS: deployed`.

### Step 3: Verify the installation

Check that the CFK pod is running:

```bash
kubectl get pods -n <namespace>
```

Expected: The `confluent-operator` pod shows `STATUS` as `Running` and
`READY` as `1/1`.

#### NOTE
If you want CFK to deploy a KRaft-based cluster with the
data recovery option, you need to specify the additional `kRaftEnabled`
flag in the `helm upgrade` command. For
the steps to deploy CFK with the data recovery feature, see [Deploy CFK with KRaft data recovery option](co-cfk-settings.md#co-deployment-kraft).

<a id="co-download-bundle"></a>

## Deploy CFK using the download bundle

### Step 1: Download and unpack the bundle

Download the CFK bundle. Replace `<version>` with the CFK version you
want to install, for example, `3.3.0`:

```bash
curl -O https://packages.confluent.io/bundle/cfk/confluent-for-kubernetes-<version>.tar.gz
```

Expected: The `confluent-for-kubernetes-<version>.tar.gz` file is downloaded
to your current directory.

Unpack the downloaded bundle:

```bash
tar -xzf confluent-for-kubernetes-<version>.tar.gz
```

Expected: A directory named `confluent-for-kubernetes-<version>-<build-id>`
is created in your current directory, for example,
`confluent-for-kubernetes-3.3.0-20260709151700`.

### Step 2: Install CFK from the bundle

Change to the `helm` sub-directory of the unpacked bundle:

```bash
cd confluent-for-kubernetes-*/helm
```

Install CFK. The `<namespace>` must already exist. If you haven’t created
one, see [Create a namespace for CFK](co-prepare.md#co-create-namespace).

```bash
helm upgrade --install confluent-operator \
  ./confluent-for-kubernetes \
  --namespace <namespace>
```

Expected: `Release "confluent-operator" does not exist. Installing it now.`,
followed by the message `STATUS: deployed`.

### Step 3: Verify the installation

Check that the CFK pod is running:

```bash
kubectl get pods -n <namespace>
```

Expected: The `confluent-operator` pod shows `STATUS` as `Running` and
`READY` as `1/1`.

<a id="co-deploy-from-operatorhub"></a>

## Deploy CFK using OpenShift OperatorHub

You can use the OpenShift OperatorHub web console to deploy CFK on OpenShift
clusters as described in [Adding Operators to a cluster](https://docs.openshift.com/container-platform/4.14/operators/admin/olm-adding-operators-to-cluster.html#olm-installing-from-operatorhub-using-web-console_olm-adding-operators-to-a-cluster).

The configuration options are limited when you install CFK in OperatorHub
where the Subscription object deploys CFK. There are a few deployment settings
which you can override permanently in the Subscription object, and you can change
most other properties of CFK by editing the `ClusterServiceVersion`. The
changes to the `ClusterServiceVersion` are temporary and are lost when a
new version of CFK is available in Operator Lifecycle Manager (OLM).

When installing CFK operator using OperatorHub, you can only
customize for namespaced deployment. Other custom parameters such
as license key are not supported when using the OperatorHub.

- For available configuration options in OperatorHub, see
  [Configurations that can be modified by the Subscription object](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/subscription-config.md).
- To learn how to configure these options in OperatorHub, see
  [How to change the Operator resource values when under OLM management](https://sdk.operatorframework.io/docs/best-practices/managing-resources/#how-to-change-the-operatormanager-resources-values-when-under-olm-management).
