kURL: How to do a standalone run of Host Preflights

Host Preflights help detect problems in the target environment for a kURL install by running checks for network connectivity, disk latency, CPU, etc. You may have a need to re-run these checks on an existing installation to ensure the environment is still in an optimal state. For more details on Host Preflights see https://kurl.sh/docs/install-with-kurl/host-preflights

Run the Host Preflights from your kURL Installer spec

This is helpful if you want to reproduce a run of the same Host Preflights from your initial install.

Get the name of the installer

kubectl get installer

Run the Host Preflights

kubectl get installer <installer> -oyaml | /var/lib/kurl/bin/kurl host preflight -

Run Host Preflights from a HostPreflight spec

Download the preflight binary from Github

curl -L https://github.com/replicatedhq/troubleshoot/releases/download/v0.31.4/preflight_linux_amd64.tar.gz | tar xzvf -

Create a YAML file of kind: HostPreflight and specify all your collectors and analyzers. You can download the below example to test

curl -LO https://raw.githubusercontent.com/replicatedhq/troubleshoot/host-preflight/examples/preflight/host-memory.yaml

Run the Host Preflights

./preflight --interactive=false sample.yaml

For more details on all the different Host Preflights available as well as what we use by default in kURL see the following resources:

https://kurl.sh/docs/create-installer/host-preflights/
https://github.com/replicatedhq/kURL/blob/main/pkg/preflight/assets/host-preflights.yaml