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:
Log in to the admin console and go to the Troubleshoot tab.
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.
noteNo data leaves the cluster. Data is never sent across the internet or to anyone else.
(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.
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:
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-bundlenoteIf 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 ofkubectl support-bundle
in these instructions with./support-bundle
or with the absolute path to the binary.(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)
To generate support bundles on earlier versions of Replicated KOTS, see Generate a Bundle (KOTS v1.94.1 and Earlier).
Support bundles are generated from one or more support bundle specifications. Specification locations include YAML manifest files in the cluster, URLs, stdin, and Secrets or ConfigMap objects embedded in a Kubernetes cluster. For more information, see Collecting a Support Bundle and Discover Cluster Specs in the Troubleshoot documentation.
The following examples show some possible CLI commands to generate a support bundle for one or more specifications and locations:
Automatically discover specifications in the cluster that are contained in Secrets or ConfigMaps:
kubectl support-bundle --load-cluster-specs
Automatically discover specifications found in the cluster that match a custom label:
kubectl support-bundle --load-cluster-specs -l LABEL
Replace
LABEL
with the label name.Using one or more files:
kubectl support-bundle ./PATH_TO_FILE1 ./PATH_TO_FILE2 ./PATH_TO_FILE3
Replace
PATH_TO_FILE
with the path and YAML file name for each file.Using a URL and a specification in the cluster:
kubectl support-bundle URL \
./PATH_TO_FILEReplace:
URL
with the online specification location provided by your vendorPATH_TO_FILE
with 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:
Log in to the admin console and go to the Troubleshoot tab.
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.
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:
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
noteFor air gap environments, download the YAML file and copy it to the air gap machine.
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.
Share the host support bundle with your vendor's support team, if needed.
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:
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'
Upload the
spec.yaml
file to the air gapped server.Run the following command to create a support bundle using the uploaded
spec.yaml
file:kubectl support-bundle /path/to/spec.yaml