# kURL: How to do a standalone run of Host Preflights

**URL:** <https://community.replicated.com/t/kurl-how-to-do-a-standalone-run-of-host-preflights/782>\
**Category:** Supporting your customers\
**Tags:** support, kurl\
**Created:** [April 27, 2022, 4:47pm UTC](https://community.replicated.com/t/kurl-how-to-do-a-standalone-run-of-host-preflights/782 "2022-04-27T16:47:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diamon\_w](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/diamon_w/32/150_2.png) [@diamon\_w](https://community.replicated.com/u/diamon_w)\
**Post date:** [April 27, 2022, 4:47pm UTC](https://community.replicated.com/t/kurl-how-to-do-a-standalone-run-of-host-preflights/782/1 "2022-04-27T16:47:50Z")

</div>

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](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://kurl.sh/docs/create-installer/host-preflights/)  
[https://github.com/replicatedhq/kURL/blob/main/pkg/preflight/assets/host-preflights.yaml](https://github.com/replicatedhq/kURL/blob/main/pkg/preflight/assets/host-preflights.yaml)

---

<div class="post-metadata">

**Author:** ![grahamnscp](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/grahamnscp/32/511_2.png) [@grahamnscp](https://community.replicated.com/u/grahamnscp)\
**Post date:** [August 4, 2022, 8:50am UTC](https://community.replicated.com/t/kurl-how-to-do-a-standalone-run-of-host-preflights/782/2 "2022-08-04T08:50:53Z")

</div>

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](http://kurl.sh) site that I wanted to share here:  
[https://kurl.sh/docs/install-with-kurl/host-preflights](https://kurl.sh/docs/install-with-kurl/host-preflights)

Graham

---

<div class="post-metadata">

**Author:** ![Alex\_Parker](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/alex_parker/32/777_2.png) [@Alex\_Parker](https://community.replicated.com/u/Alex_Parker)\
**Post date:** [August 4, 2022, 11:47am UTC](https://community.replicated.com/t/kurl-how-to-do-a-standalone-run-of-host-preflights/782/3 "2022-08-04T11:47:06Z")

</div>

There is also Replicated documentation [here](https://docs.replicated.com/vendor/preflight-support-bundle-creating#about-host-preflight-checks-for-kubernetes-installers) 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.

---

<div class="post-metadata">

**Author:** ![diamon\_w](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/diamon_w/32/150_2.png) [@diamon\_w](https://community.replicated.com/u/diamon_w)\
**Post date:** [June 28, 2023, 1:04am UTC](https://community.replicated.com/t/kurl-how-to-do-a-standalone-run-of-host-preflights/782/4 "2023-06-28T01:04:10Z")

</div>

The referenced documentation above can now be found at - [Customizing Host Preflight Checks for kURL | Replicated Docs](https://docs.replicated.com/vendor/preflight-host-preflights#about-host-preflight-checks)
