# Configure Debug Bundle Management in Kubernetes

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

---
title: Configure Debug Bundle Management in Kubernetes
latest-redpanda-tag: v25.2.1
latest-console-tag: v3.7.3
latest-operator-version: v26.1.4
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "true"
page-is-past-eol: "false"
page-eol-date: July 31, 2026
latest-connect-version: 4.93.0
docname: debug-bundle/configure/kubernetes
page-component-name: streaming
page-version: "25.2"
page-component-version: "25.2"
page-component-title: Streaming
page-relative-src-path: debug-bundle/configure/kubernetes.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/v/25.2/modules/troubleshoot/pages/debug-bundle/configure/kubernetes.adoc
description: Learn how to configure debug bundle retention and storage in Kubernetes environments.
page-git-created-date: "2024-12-16"
page-git-modified-date: "2024-12-16"
support-status: nearing end-of-life
---

<!-- Source: https://docs.redpanda.com/streaming/25.2/troubleshoot/debug-bundle/configure/kubernetes.md -->

Learn how to configure debug bundle retention and storage in Kubernetes environments.

> 📝 **NOTE**
>
> These configuration options apply only when you trigger a debug bundle remotely. For example using Redpanda Console, `rpk debug remote-bundle`, or the Admin API. They do not apply to the `rpk debug bundle` command.

## [](#remove)Automatically remove debug bundles

To avoid manually deleting debug bundles, you can configure the [`debug_bundle_auto_removal_seconds`](https://docs.redpanda.com/streaming/25.2/reference/properties/cluster-properties/#debug_bundle_auto_removal_seconds) property. This cluster configuration property automatically deletes debug bundles after the specified number of seconds. By default, this property is not set, meaning debug bundles are retained indefinitely.

> 📝 **NOTE**
>
> Only one debug bundle can exist at a time. If you generate a new debug bundle, any existing bundle from a previous run will be automatically deleted.

Changes to this property take effect immediately and do not require a cluster restart.

To set this property, use the `config.cluster.debug_bundle_auto_removal_seconds` field:

### Operator

`redpanda-cluster.yaml`

```yaml
apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda
metadata:
  name: redpanda
spec:
  chartRef: {}
  clusterSpec:
    config:
      cluster:
        debug_bundle_auto_removal_seconds: <seconds>
```

For example, to retain debug bundles for 1 day:

`redpanda-cluster.yaml`

```yaml
apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda
metadata:
  name: redpanda
spec:
  chartRef: {}
  clusterSpec:
    config:
      cluster:
        debug_bundle_auto_removal_seconds: 86400
```

Apply the changes with:

```bash
kubectl apply -f redpanda-cluster.yaml --namespace <namespace>
```

### Helm

Update the `values.yaml` file or use the `--set` flag to specify the property:
#### --values

`cloud-storage.yaml`

```yaml
config:
  cluster:
    debug_bundle_auto_removal_seconds: <seconds>
```

For example, to retain debug bundles for 1 day:

`cloud-storage.yaml`

```yaml
config:
  cluster:
    debug_bundle_auto_removal_seconds: 86400
```

Apply the changes with:

```bash
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --values cloud-storage.yaml --reuse-values
```

#### --set

```bash
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --set config.cluster.debug_bundle_auto_removal_seconds=<seconds>
```

For example, to retain debug bundles for 1 day:

```bash
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --set config.cluster.debug_bundle_auto_removal_seconds=86400
```

## [](#save)Choose where the debug bundle is saved

The [`debug_bundle_storage_dir`](https://docs.redpanda.com/streaming/25.2/reference/properties/cluster-properties/#debug_bundle_storage_dir) property allows you to specify a custom directory for storing debug bundles on the broker. By default, debug bundles are stored in the Redpanda data directory. Configuring a custom storage directory can help manage storage capacity and isolate debug data from operational data.

Changes to this property take effect immediately and do not require a cluster restart.

Before you change this property:

-   Ensure that your chosen directory has sufficient storage capacity to handle debug bundles.

    Factors such as the volume of logs can increase the bundle size. While it is difficult to define an exact storage requirement due to variability in bundle size, 200 MB should be sufficient for most cases.

-   Verify the directory’s permissions to ensure Redpanda can write to it. By default, Redpanda operates as the `redpanda` user within the `redpanda` group.


To set this property, use the `config.cluster.debug_bundle_storage_dir` field:

### Operator

`redpanda-cluster.yaml`

```yaml
apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda
metadata:
  name: redpanda
spec:
  chartRef: {}
  clusterSpec:
    config:
      cluster:
        debug_bundle_storage_dir: <path-to-directory>
```

For example:

```yaml
apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda
metadata:
  name: redpanda
spec:
  chartRef: {}
  clusterSpec:
    config:
      cluster:
        debug_bundle_storage_dir: /var/log/redpanda/debug_bundles
```

Apply the changes with:

```bash
kubectl apply -f redpanda-cluster.yaml --namespace <namespace>
```

### Helm

Update the `values.yaml` file or use the `--set` flag to specify the property:
#### --values

```yaml
config:
  cluster:
    debug_bundle_storage_dir: <path-to-directory>
```

For example, to store debug bundles in `/var/log/redpanda/debug_bundles`:

```yaml
config:
  cluster:
    debug_bundle_storage_dir: /var/log/redpanda/debug_bundles
```

Apply the changes with:

```bash
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --values values.yaml --reuse-values
```

#### --set

```bash
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --set config.cluster.debug_bundle_storage_dir=<path-to-directory>
```

For example:

```bash
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --set config.cluster.debug_bundle_storage_dir=/var/log/redpanda/debug_bundles
```

## [](#next-steps)Next steps

[Generate Debug Bundles](https://docs.redpanda.com/streaming/25.2/troubleshoot/debug-bundle/generate/).