Support bundle
To generate support bundles directly from the command line, you must have the kubectl extension support bundle plugin installed.
Install the support bundle plugin
You can install the support bundle plugin using Krew plugin manager, or you can obtain the support bundle plugin from the release archives and install it manually.
Optional. Install the Krew plugin manager if is not yet installed on your system. For detailed instruction, refer to the official Krew documentaiton Installing.
Install the support bundle plugin:
kubectl krew install support-bundle
Append the
$HOME/.krew/bin
directory to your$PATH
environment variable:export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
Verify the support bundle plugin installation:
Restart your shell.
Run the
kubectl krew
command.
You can manually install the support bundle plugin from the release archives. A key advantage this method offers is that it facilitates the installation in air gap environments.
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
```
Upgrade a support bundle
The instruction for upgrading the support bundle plugin corresponds to the method that was used to install the plugin.
Run the following krew command to upgrade your existing support-bundle:
kubectl krew upgrade support-bundle
Run the following commands to manually upgrade your existing support-bundle:
- Download the latest version of the plugin:
curl -L https://github.com/replicatedhq/troubleshoot/releases/latest/download/support-bundle_linux_amd64.tar.gz | tar xzvf -
- Replace the existing plugin with the new version:
sudo mv ./support-bundle /usr/local/bin/kubectl-support_bundle
Uninstall a support bundle
The instruction for uninstalling the support bundle plugin corresponds to the method that was used to install the plugin.
Run the following command to remove the support bundle plugin:
kubectl krew uninstall support-bundle
- Delete the
support-bundle
binary file from where it was placed at installation. - Remove the support bundle:
sudo rm /usr/local/bin/kubectl-support_bundle
Create a support bundle
Construct a YAML file to set the support bundle configuration.
The example
your-support-bundle.yaml
file that follows:- Collects basic information about the cluster.
- Enumerates all available resources in the cluster.
- Collects logs from the
blueprint-controller-manager
andblueprint-operator-webhook
pods, in thelogs/
directory of the output.
apiVersion: troubleshoot.sh/v1beta2 kind: SupportBundle metadata: name: sample spec: collectors: - logs: selector: - app.kubernetes.io/name=blueprint-webhook namespace: blueprint-system name: logs/blueprint-system - logs: selector: - control-plane=controller-manager namespace: blueprint-system name: logs/blueprint-system
Generate the support bundle:
kubectl support-bundle ./path-to-your-support-bundle.yaml
By default, the support bundle collects cluster information and cluster resources.
For a comprehensive list of available in-cluster collectors, refer to the official Troubleshoot All Collectors documentation.
Collect host information using the k0s-provided YAML file
Obtain the k0s-provided YAML file.
Run the
support-bundle
tool:./support-bundle --kubeconfig /var/lib/k0s/pki/admin.conf <support-bundle-worker.yaml>
ℹ️Thesupport-bundle
tool requires that thekubeconfig
file be passed as an argument. Thekubeconfig
file is located at/var/lib/k0s/pki/admin.conf
.
Now, you can find the support bundle with the collected host information at support-bundle-<timestamp>.tar.gz
.