Skip to main content

Generating Support Bundles

The Replicated admin console includes a Troubleshoot page where you can generate an analysis and review remediation suggestions for troubleshooting an application. You can download a support bundle to share with your vendor.

Alternatively, you can generate a support bundle using the support-bundle CLI. For embedded clusters, you can also generate a host support bundle.

Generate a Support Bundle using the Admin Console

To generate a support bundle in the Replicated admin console:

  1. Log in to the admin console and go to the Troubleshoot tab.

    Troubleshoot

  2. Click Analyze to start analyzing the application.

    The analysis executes the support bundle plugin. After the analysis completes, the bundle is available on the Troubleshoot tab in the admin console. If any known issues are detected, they are highlighted with possible remediation suggestions.

    note

    No data leaves the cluster. Data is never sent across the internet or to anyone else.

    Analysis

  3. (Optional) Click Download bundle to download the support bundle. You can send the bundle to your vendor for assistance.

Generating a Support Bundle using the CLI

You can generate a support bundle using the support-bundle CLI instead of the admin console. For example, the admin console might not be available if you are using a Replicated kURL installer and the installation fails. Or perhaps you need to use a more recent version of the support-bundle plugin than what is embedded in the admin console.

Prerequisite: Install the Plugin

For existing clusters, do a first-time installation or upgrade the support-bundle plugin (a kubectl plugin) before you generate a support bundle using the CLI. The plugin is required to generate a support bundle.

You can install the support-bundle plugin using krew or install it manually from the release archives.

note

If your application was installed using a Replicated kURL script, then kubectl and the support-bundle plugin is already present on all of the control plane nodes. You can skip this prerequisite.

Install or Upgrade using krew

To install the support-bundle plugin using krew, do one of the following:

  • If krew is not installed already, run the following command to install krew and the support-bundle plugin at the same time:

    curl https://krew.sh/support-bundle | bash
  • If krew is installed already, run the following command to install the plug-in:

    kubectl krew install support-bundle
  • To upgrade your existing support-bundle plugin using krew:

    kubectl krew upgrade support-bundle

Install Manually

If you do not want to install the plugin using krew or want an easier way to install the plugin in an air gapped environment, you can install the plugin manually from the release archives.

To install the support-bundle plugin manually:

  1. Run the following command to download and unarchive the latest release, and move the plugin to your $PATH:

    curl -L https://github.com/replicatedhq/troubleshoot/releases/latest/download/support-bundle_linux_amd64.tar.gz | tar xzvf -
    sudo mv ./support-bundle /usr/local/bin/kubectl-support-bundle
    note

    If you do not have root access, or choose not to add the support-bundle plugin to your path, you can run the binary directly from where you unzipped it by executing ./support-bundle. If you choose not to put the plugin into your $PATH, then replace all instances of kubectl support-bundle in these instructions with ./support-bundle or with the absolute path to the binary.

  2. (Optional) Run the following command to test that the installation is working:

    kubectl support-bundle --help

Generate a Bundle (KOTS v1.94.2 and Later)

note

To generate support bundles on earlier versions of Replicated KOTS, see Generate a Bundle (KOTS v1.94.1 and Earlier).

Support bundles are generated by providing one or more support bundle specifications with the kubectl support-bundle command.

For installations with the Helm CLI or with KOTS, specifications can be provided from YAML files in the local directory or from a URL. Additionally, for installations with the Helm CLI or with KOTS v1.104.0 and later, specifications can be automatically discovered in Secret or ConfigMap objects in the cluster using the --load-cluster-specs flag with the kubectl support-bundle.

For a complete list of options with the kubectl support-bundle command, run kubectl support-bundle --help. For more information, see Collecting a Support Bundle and Discover Cluster Specs in the Troubleshoot documentation.

The following lists some possible uses of the kubectl support-bundle CLI command to generate a support bundle from one or more specifications:

  • Discover all specifications defined in Secrets or ConfigMaps in the cluster:

    kubectl support-bundle --load-cluster-specs
  • Discover all specifications defined in Secrets or ConfigMaps in the cluster that match a custom label:

    kubectl support-bundle --load-cluster-specs -l LABEL

    Where LABEL is the name of the custom label.

  • Provide one or more files that contain support bundle specifications:

    kubectl support-bundle ./PATH_TO_FILE1 ./PATH_TO_FILE2 ./PATH_TO_FILE3

    Where PATH_TO_FILE is the path and YAML file name for each file.

  • Provide one specification that is located at a URL and another specification located in the local directory:

    kubectl support-bundle URL \
    ./PATH_TO_FILE

    Where:

    • URL is the URL where the specification is located
    • PATH_TO_FILE is the path and YAML file name

Generate a Bundle (KOTS v1.94.1 and Earlier)

If the Replicated admin console is running and the application is installed, log in to the admin console to get the CLI command for generating a support bundle.

To generate a support bundle with the CLI:

  1. Log in to the admin console and go to the Troubleshoot tab.

  2. On the Troubleshoot page, at the bottom of the Support Bundles section, click the If you'd prefer, click here to get a command to manually generate a support bundle link to get the command to generate a support bundle.

    The command includes customizations provided by your application vendor.

  3. Run the command provided in the admin console to generate a support bundle:

    kubectl support-bundle secret/NAMESPACE/kotsadm-APP_SLUG-supportbundle --redactors=configmap/NAMESPACE/kotsadm-redact-spec/redact-spec,configmap/NAMESPACE/kotsadm-APP_SLUG-redact-spec/redact-spec

    Replace:

    • NAMESPACE with the name of the namespace.
    • APP_SLUG with the unique application slug.

Generate a Host Support Bundle

For embedded clusters provisioned by a kURL installer, you can generate a host support bundle. Use this method when:

  • A cluster is down
  • The application is not installed
  • The Replicated admin console is not working
  • To debug a host-specific performance and configuration problems even when the cluster is running

Your vendor typically provides a host support bundle YAML file that you run with a command to generate the host support bundle. You can also create a your own host support bundle YAML file. For more information about creating a YAML file, see All Host Collectors and Analyzers in the Troubleshoot documentation.

If you want to use a default YAML file from the Troubleshoot.sh repository for troubleshooting a degraded cluster, follow the command in the steps below.

Root access is typically not required to run the host collectors and analyzers. However, depending on what is being collected, you might need to run the support-bundle binary with elevated permissions. For example, if you run the filesystemPerformance host collector against /var/lib/etcd and the user running the binary does not have permissions on this directory, the collection process fails.

To generate a host support bundle:

  1. Do one of the following:

    • Save the host support bundle YAML file on the host.

    • Run the following command to download a host support bundle YAML file from the Troubleshoot repository that can help troubleshoot a degraded embedded cluster:

      kubectl support-bundle https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/host/default.yaml
    note

    For air gap environments, download the YAML file and copy it to the air gap machine.

  2. Run the following command on the host to generate a host support bundle:

    ./support-bundle --interactive=false PATH/FILE.yaml

    Replace:

    • PATH with the path to the host support bundle YAML file.
    • FILE with the name of the host support bundle YAML file from your vendor.
  3. Share the host support bundle with your vendor's support team, if needed.

  4. Repeat these steps for each node because there is no method to generate host support bundles on remote hosts. If you have a multi-node embedded cluster, you must run the support-bundle binary on each node and generate a host support bundle for each node.

Generate a Bundle with a Default kots.io File

You can generate a support bundle using the default kots.io manifest file if the application does not have a support bundle manifest included.

In an Online Environment

In an online environment, run the following command to generate a support bundle using the default kots.io manifest file:

kubectl support-bundle https://kots.io

On an Air Gap Server

If you are on an air gapped server, perform the following steps to create a support bundle using the default kots.io manifest file:

  1. Run the following command from a computer with internet access to download the default kots.io manifest:

    curl -o spec.yaml https://kots.io -H 'User-agent:Replicated_Troubleshoot/v1beta1'
  2. Upload the spec.yaml file to the air gapped server.

  3. Run the following command to create a support bundle using the uploaded spec.yaml file:

    kubectl support-bundle /path/to/spec.yaml