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/latest/download/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/main/examples/collect/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

1 Like

Hi @diamon_w thank you for posting this, useful command line resources for me looking into host preflights

Just a note that I had to add sudo to the Run the Host Preflights command for it to do some of the checks:
kubectl get installer <installer> -o yaml | sudo /var/lib/kurl/bin/kurl host preflight -

I also came across a useful doc page on the kurl.sh site that I wanted to share here:
https://kurl.sh/docs/install-with-kurl/host-preflights

Graham

1 Like

There is also Replicated documentation here that provides a procedure and more information on how to customize host preflights. It doesn’t talk about how to do a standalone run of preflights, but it gives good information on host preflights generally and how to customize them.

2 Likes

The referenced documentation above can now be found at - Customizing Host Preflight Checks for kURL | Replicated Docs