# Set Up GitOps for the Redpanda Helm Chart

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [labs-full.txt](https://docs.redpanda.com/labs-full.txt)

---
title: Set Up GitOps for the Redpanda Helm Chart
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: gitops-helm
page-component-name: labs
page-version: master
page-component-version: master
page-component-title: Labs
page-relative-src-path: gitops-helm.adoc
page-edit-url: https://github.com/redpanda-data/redpanda-labs/edit/main/docs/modules/kubernetes/pages/gitops-helm.adoc
description: Use Flux to deploy the Redpanda Helm chart on a local Kubernetes cluster.
page-git-created-date: "2025-05-06"
page-git-modified-date: "2025-05-06"
---

<!-- Source: https://docs.redpanda.com/labs/kubernetes/gitops-helm.md -->

GitOps is a modern approach to managing and automating the deployment and provisioning process using Git as the single source of truth. It involves storing configuration files and deployment scripts in a Git repository, and then using automation tools to continuously monitor the repository for changes.

This example uses Flux to deploy the Redpanda Helm chart on a local Kubernetes cluster. Flux is a toolkit for GitOps with Kubernetes clusters that supports the following:

-   **Version control for configurations**: You can track changes, collaborate, and revert to previous configurations if needed.

-   **Drift detection and remediation**: Flux continuously monitors the Redpanda cluster’s state. If discrepancies are detected, Flux automatically remediates them to bring the Redpanda cluster back to the desired state.

-   **Collaboration and auditing**: Multiple team members can propose changes to Redpanda configurations through Git pull requests, enabling code reviews and discussions before changes are applied.


## [](#prerequisites)Prerequisites

You must have the following:

-   [A GitHub account](https://github.com/signup).

-   [The Flux CLI](https://fluxcd.io/flux/installation/#install-the-flux-cli)

-   An understanding of the [core concepts of Flux](https://fluxcd.io/flux/concepts/).

-   At least version 1.24 of [the kubectl CLI](https://kubernetes.io/docs/tasks/tools/).

    ```bash
    kubectl version --client
    ```

-   At least version 3.6.0 of [Helm](https://helm.sh/docs/intro/install/).

    ```bash
    helm version
    ```

-   [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)

-   [Docker](https://docs.docker.com/get-docker/)


## [](#create-a-local-kubernetes-cluster)Create a local Kubernetes cluster

Create one master and three worker nodes (one worker node for each Redpanda broker).

1.  Define a cluster in the `kind.yaml` configuration file:

    ```bash
    cat <<EOF >kind.yaml
    ---
    apiVersion: kind.x-k8s.io/v1alpha4
    kind: Cluster
    nodes:
      - role: control-plane
      - role: worker
      - role: worker
      - role: worker
    EOF
    ```

2.  Create the Kubernetes cluster from the configuration file:

    ```bash
    kind create cluster --config kind.yaml
    ```


## [](#run-the-lab)Run the lab

Fork this repository, and configure Flux to connect to your fork and deploy the Redpanda Helm chart.

1.  Fork the [`redpanda-data/redpanda-labs`](https://github.com/redpanda-data/redpanda-labs) repository on GitHub.

2.  Bootstrap Flux for your forked repository.

    > 📝 **NOTE**
    >
    > Make sure to do the following:
    >
    > -   Provide Flux with your [GitHub personal access token (PAT)](https://fluxcd.io/flux/installation/bootstrap/github/#github-pat).
    >
    > -   Configure the `path` flag with the value `kubernetes/gitops-helm`. This is the path where the example manifests are stored in the repository.

    Here is an example of the bootstrap command:

    ```bash
    flux bootstrap github \
      --token-auth \
      --owner=<github-username> \
      --repository=redpanda-labs \
      --branch=main \
      --path=./kubernetes/gitops-helm \
      --personal
    ```

    Replace `<github-username>` with your GitHub username.


The bootstrap script does the following:

1.  Creates a deploy token and saves it as a Kubernetes Secret

2.  Creates an empty GitHub project, if the project specified by `--repository` doesn’t exist

3.  Generates Flux definition files for your project

4.  Commits the definition files to the specified branch

5.  Applies the definition files to your cluster

6.  Applies the manifests in `kubernetes/gitops-helm` which deploy Redpanda and cert-manager


After you run the script, Flux is ready to manage itself and any other resources you add to the GitHub project at the specified path.

## [](#verify-the-deployment)Verify the deployment

To verify that the deployment was successful, check the status of the HelmRelease resource:

```bash
kubectl get helmrelease redpanda --namespace redpanda --watch
```

In a few minutes, you should see that the Helm install succeeded:

NAME       AGE     READY   STATUS
redpanda   3m23s   True    Helm install succeeded for release redpanda/redpanda.v1 with chart redpanda@5.7.5

## [](#manage-updates)Manage updates

To update Redpanda, modify the `redpanda-helm-release.yaml` manifest in your Git repository. You can configure the Helm chart in the `spec.values` field. For a description of all available configurations, see the [Redpanda Helm Chart Specification](https://docs.redpanda.com/current/reference/k-redpanda-helm-spec/).

When you push changes to GitHub, Flux automatically applies the updates to your Kubernetes cluster.

## [](#delete-the-cluster)Delete the cluster

To delete the Kubernetes cluster as well as all the Docker resources that kind created, run:

```bash
kind delete cluster
```

## [](#suggested-reading)Suggested reading

See the [interactive examples](https://play.instruqt.com/redpanda/invite/l2huksol8qhv) for setting up GitOps with the Redpanda Operator.