KOTS: How can i generate a support bundle if i cannot access the admin console?

On an embedded KURL cluster installing the KOTS admin console or uploading the app may fail. In this case it may not be possible to access the admin console to generate a support bundle.

It is possible to generate a support bundle using the default kots.io spec by running the following command:

kubectl support-bundle https://kots.io

On an airgapped/airgap server it is possible to copy the default kots.io spec using this command:

curl -o spec.yaml https://kots.io -H 'User-agent:Replicated_Troubleshoot/v1beta1'

The spec can then be uploaded to the server and the local spec can be used by running:

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

If the admin console is running and the app is installed you can use:

kubectl support-bundle http://<server-address>:8800/api/v1/troubleshoot/<app-slug>

If the app is not installed but the admin console is running:

kubectl support-bundle http://<server-address>:8800/api/v1/troubleshoot

If you do not already have the support-bundle kubectl plugin installed, it can be installed by running:

curl https://krew.sh/support-bundle | bash

Or by installing krew and running:

kubectl krew install support-bundle

When running the support-bundle command kubectl support-bundle in a KURL cluster, it is possible to receive the error unknown command ""support-bundle" for "kubectl".

The support bundle binary is located at /usr/local/bin/kubectl-support_bundle and can be substituted in all of the above commands for kubectl support-bundle.

For example:

/usr/local/bin/kubectl-support_bundle /path/to/spec.yaml

@ethanm - Is it possible to automate this command . At the moment it requires interaction - Save (S) or Quit (Q)

Use the --interactive flag. Also checkout the output for support-bundle --help for more useful flags:

kubectl support-bundle --interactive=false