Generate support bundles
This topic describes how to generate support bundles from the command line using the kubectl support-bundle plugin. For more information about support bundles, see About Preflights and Support Bundles.
The information in this topic applies to generating support bundles in clusters where you have kubectl access. For information about generating support bundles that include cluster- and host-level information for Replicated Embedded Cluster installations, see Generating Support Bundles for Embedded Cluster.
Prerequisite: Install the support-bundle plugin
The support-bundle plugin (a kubectl plugin) is required to generate support bundles from the command line.
For Replicated Embedded Cluster and Replicated kURL installations, the support-bundle plugin is automatically installed on all of the control plane nodes. You can skip this prerequisite.
Mac
For Mac users, Replicated recommends using Homebrew to install the support-bundle plugin:
brew install support-bundle
Windows / Linux
For Windows and Linux users, use Krew to install the support-bundle plugin:
-
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 plugin:
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 gap 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-bundlein these instructions with./support-bundleor 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
Run the following command to generate a bundle:
kubectl support-bundle --load-cluster-specs
The --load-cluster-specs flag automatically discovers all support bundle specs that are defined in Secrets or ConfigMaps in the cluster. For more information, see Discover Cluster Specs in the Troubleshoot documentation.
For a complete list of options with the kubectl support-bundle command, run kubectl support-bundle --help. For more information, see Collect a Support Bundle in the Troubleshoot documentation.
Generate a bundle when a Helm installation fails
If a Helm installation fails and you want to collect a support bundle to assist with diagnostics, you can use a Replicated default specification to generate the support bundle.
Run the following command:
kubectl support-bundle https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/in-cluster/default.yaml
Troubleshoot
Support bundle is missing app-info or license data
Symptom
After uploading a support bundle to the Vendor Portal, you see warnings: "No app-info file found" or "No license file found."
Cause
The Replicated SDK's built-in support bundle spec uses exec collectors to retrieve application and license information from the SDK pod. If the service account running the support bundle does not have pods/exec permissions with the create verb, these collectors fail silently and the data is not included in the bundle.
Solution
Add pods/exec permissions to the RBAC Role or ClusterRole for the service account running the support bundle:
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["create"]
For more information, see RBAC requirements for exec collectors.