<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.13 </button>

- [Latest](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/preflight)
- [Version 1.16](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.16/installing/preflight.md.txt)
- [Earlier versions (unsupported)](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/getting-support.md.txt#version-support)

<br />

In Google Distributed Cloud you can run preflight checks for different
situations:

- Google Distributed Cloud runs preflight checks when you create or update admin, hybrid, standalone, or user clusters and nodepool resources with `bmctl`. If the checks fail, no changes are made. You can also bypass these checks.
- Google Distributed Cloud also runs internal preflight checks when you apply Kubernetes resources to user clusters from an admin or hybrid cluster. The checks are run before changes are actually applied to affected user clusters. If the checks fail, no changes are made. You can also bypass these checks, or run them explicitly.

## Preflight checks for cluster creation with `bmctl`

When you create [admin](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/creating-clusters/admin-cluster-creation.md.txt),
[hybrid](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/creating-clusters/hybrid-cluster-creation.md.txt),
[standalone](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/creating-clusters/standalone-cluster-creation.md.txt), or
[user](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/creating-clusters/user-cluster-creation.md.txt) clusters with the
`bmctl` command, Google Distributed Cloud automatically runs preflight checks
before any changes are made.

When the checks pass, Google Distributed Cloud will create the clusters.

### Ignore the results of automated preflight checks

If you want to bypass these automated preflight checks, you can use the optional
`--force` flag in the command.

### Run preflight checks independently

You can also run preflight checks by themselves, before you create a cluster.
This can help save time by ensuring your machine and node resources pass checks.

- The following command validates the specified cluster config file, but doesn't try
  to create the cluster itself:

  ```bash
  bmctl check config --cluster CLUSTER_NAME
  ```

  Replace <var translate="no">CLUSTER_NAME</var> with the name of the cluster whose config
  file you're checking.
- This command checks whether the machines and network are ready for cluster
  creation:

  ```bash
  bmctl check preflight --cluster CLUSTER_NAME
  ```

  Replace <var translate="no">CLUSTER_NAME</var> with the name of the cluster you're
  checking.

## Preflight checks for user cluster creation

[User clusters are created](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/creating-clusters/user-cluster-creation.md.txt) from an
existing admin or hybrid cluster. Google Distributed Cloud automatically runs
preflight checks before making any changes. You can also run preflight checks
with `bmctl` before you create a cluster.

- The following command validates the specified cluster config file, but doesn't try
  to create the cluster itself:

  ```bash
  bmctl check config --cluster CLUSTER_NAME --admin-kubeconfig ADMIN_KUBECONFIG_PATH
  ```

  Replace <var translate="no">CLUSTER_NAME</var> with the name of the user cluster you're
  checking and replace <var translate="no">ADMIN_KUBECONFIG_PATH</var> with the path to the
  associated admin cluster's `kubeconfig` file.
- This command checks whether the machines and network are ready for cluster
  creation:

  ```bash
  bmctl check preflight --cluster CLUSTER_NAME --admin-kubeconfig ADMIN_KUBECONFIG_PATH
  ```

`bmctl` supports the use of
`--kubeconfig` as an alias for the`--admin-kubeconfig` flag.

## Internal preflight checks on existing clusters

Google Distributed Cloud also performs internal preflight checks when you
apply Kubernetes resources to an existing cluster. If any checks fail,
Google Distributed Cloud will not make any changes to the related nodes unless you've
specifically [bypassed the checks](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/preflight.md.txt#bypass-preflight).

### Bypass preflight checks when applying Kubernetes resources

To ignore the internal preflight checks when applying resources to existing clusters,
you need to set the `BypassPreflightCheck` field to `true` in the cluster YAML file.

Here is a fragment of a cluster config YAML file, showing the `bypassPreflightCheck`
field set to `true`.

```
# Sample cluster config to bypass preflight check errors:

apiVersion: v1
kind: Namespace
metadata:
  name: cluster-user1
---
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
  name: user1
  namespace: cluster-user1
spec:
  type: user
  bypassPreflightCheck: true
  # Anthos cluster version.
  anthosBareMetalVersion: 1.13.10
....
```

## Installation preflight check details

Google Distributed Cloud checks a variety of operating system, software, and machine
prerequisite conditions when running preflight checks.

For more detailed information, see [Installation prerequisites overview](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.13/installing/install-prereq.md.txt).