# Generating support bundle with Helm CLI installs

**URL:** <https://community.replicated.com/t/generating-support-bundle-with-helm-cli-installs/1188>\
**Category:** How do I?\
**Tags:** support-bundle, helm\
**Created:** [April 17, 2023, 7:15pm UTC](https://community.replicated.com/t/generating-support-bundle-with-helm-cli-installs/1188 "2023-04-17T19:15:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chbrosso](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/chbrosso/32/454_2.png) [@chbrosso](https://community.replicated.com/u/chbrosso)\
**Post date:** [April 17, 2023, 7:15pm UTC](https://community.replicated.com/t/generating-support-bundle-with-helm-cli-installs/1188/1 "2023-04-17T19:15:41Z")

</div>

We’re porting our existing Replicated app to Helm native, and in particular Helm CLI, and would like to provide the same support bundles as we do on Replicated KOTS.  
How can support bundles be generated when installed with Helm CLI?

---

<div class="post-metadata">

**Author:** ![Xav\_Paice](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/xav_paice/32/472_2.png) [@Xav\_Paice](https://community.replicated.com/u/Xav_Paice)\
**Post date:** [April 17, 2023, 11:50pm UTC](https://community.replicated.com/t/generating-support-bundle-with-helm-cli-installs/1188/2 "2023-04-17T23:50:05Z")

</div>

Hi,

One of the things that KOTS does when it installs the app, is take the support bundle you’ve put together and installs it as a secret in the cluster.

This secret can be found by `support-bundle` from the CLI like this:

```auto
kubectl support-bundle --load-cluster-specs

```

Note also, that you can supply multiple specs.

To match current KOTS behavior, you’d include secrets in the Helm installation templates that have the content of the support-bundle you’d normally use, plus the defaults from KOTS (found [here](https://github.com/replicatedhq/kots/blob/main/pkg/supportbundle/defaultspec/spec.yaml)). The secret (or configMap) needs to have a label for Troubleshoot to find it: `troubleshoot.io/kind=support-bundle`.

The secrets would be in the format:

```yaml
apiVersion: v1
data:
  support-bundle-spec: (base64 encoded support-bundle spec)
kind: Secret
metadata:
  labels:
    troubleshoot.sh/kind: support-bundle
  name: someapp-supportbundle
  namespace: default
type: Opaque

```

I should point out that you don’t _need_ to put the spec into a secret - you can supply a local file, a url, or an oci reference to the Replicated registry. Take a look at `kubectl support-bundle --help` and you’ll see the CLI options.

---

<div class="post-metadata">

**Author:** ![chbrosso](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/chbrosso/32/454_2.png) [@chbrosso](https://community.replicated.com/u/chbrosso)\
**Post date:** [April 19, 2023, 12:28pm UTC](https://community.replicated.com/t/generating-support-bundle-with-helm-cli-installs/1188/3 "2023-04-19T12:28:04Z")

</div>

Thanks, it works great!  
Out of curiosity, is there any reason why it needs to be put in a secret, instead of just putting it in the namespace as a `SupportBundle` object?

---

<div class="post-metadata">

**Author:** ![Xav\_Paice](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/xav_paice/32/472_2.png) [@Xav\_Paice](https://community.replicated.com/u/Xav_Paice)\
**Post date:** [May 3, 2023, 10:08pm UTC](https://community.replicated.com/t/generating-support-bundle-with-helm-cli-installs/1188/6 "2023-05-03T22:08:46Z")

</div>

Hi, we don’t usually install the CRDs for the SupportBundle objects, which is why we can’t install them.

There’s an option to use ConfigMap too but I prefer them to be secrets because there’s potentially private info (e.g. database connection strings).
