---
title: "Preflight"
description: "opodcp preflight checks a cluster before helm install. Every row, its severity, and the flags that change what it checks."
url: "https://opod.io/docs/control-plane-install/preflight/"
markdown_url: "https://opod.io/docs/control-plane-install/preflight.md"
section: "Install"
last_updated: "2026-11-01"
---

# Preflight

> opodcp preflight checks a cluster before helm install. Every row, its severity, and the flags that change what it checks.

## In short

`opodcp preflight` reads your cluster and tells you, row by row, whether `helm install opodcp` will work. It changes nothing. A fatal row (`✘`) blocks the install; a warning (`!`) or information row (`i`) tells you about a value you may want to set. The chart runs the same check as a hook, so running it first only shows you the answer sooner.

## When you need it

- Before the first `helm install`, on any cluster.
- Before an upgrade, with `--upgrade`, to see what the pre-upgrade hook will say.
- When `helm install` or `helm upgrade` stops with `Job Failed` and you need the full report.
- Before you raise `replicas` or set `workloads.leaderPool`, to check there are enough nodes.

## Do it

1. **Run it against the cluster**

   ```bash
   docker run --rm --network host -v ~/.kube:/kube:ro \
     ghcr.io/opod-io/opodcp:0.3.6 preflight --kubeconfig /kube/config
   ```

   Add the flags of the release you will install, so the rows judge the same thing: `--namespace opodcp`, `--replicas 3` for HA, `--leader-pool opod.io/pool=fronts` with a leader pool.

2. **Fix each fatal row**

   Every `✘` row ends in `→` and the remedy. For example:

   ```text
   ✘ dns.coredns        0 CoreDNS pod(s)  → cluster DNS is required (workers join leaders via Service DNS)
   ```

3. **Run it again, then install**

   Repeat until no row is fatal, then go on with [Install on Kubernetes](https://opod.io/docs/control-plane-install/kubernetes/), step 2.

## Check it worked

```bash
docker run --rm --network host -v ~/.kube:/kube:ro \
  ghcr.io/opod-io/opodcp:0.3.6 preflight --kubeconfig /kube/config; echo "exit=$?"
```

A good answer ends with `cluster ready for: helm install opodcp charts/opodcp -n opodcp --create-namespace` and `exit=0`. That line names the chart by a local path; use `oci://ghcr.io/opod-io/charts/opodcp` as the other pages do. Warnings and information rows do not change the exit status.

## If it fails

| Output                                                                                                                                                                    | Cause                                                                                | Fix                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| `error: 1 fatal check(s): k8s.version — …`                                                                                                                                | Kubernetes older than 1.28                                                           | upgrade the cluster                                                                               |
| `✘ nodes.ready  3/4 nodes Ready  → kubectl describe node <notready>` (from the release after 0.3.6 the remedy names the NotReady nodes: `→ kubectl describe node node-d`) | a node is NotReady                                                                   | `kubectl describe node NODE`; on an upgrade the hook passes `--upgrade` and this row is a warning |
| `✘ ha.nodes`                                                                                                                                                              | `--replicas` is larger than the Ready, schedulable nodes                             | add or uncordon nodes, or lower `replicas`                                                        |
| `✘ fronts.pool`                                                                                                                                                           | the leader pool matches fewer than two nodes, or is not a label selector             | label two nodes so the pool matches, or widen `workloads.leaderPool`                              |
| `✘ endpoints.expose`                                                                                                                                                      | `endpoints.expose=gateway` and no Programmed Gateway                                 | fix the Gateway, or use `endpoints.expose=auto`                                                   |
| `preflight could not read the cluster: … — retrying once in 5s`                                                                                                           | the kubeconfig is wrong or the API server does not answer                            | that is the check failing, not a verdict; fix `--kubeconfig` or the network and run it again      |
| `error: kubeconfig PATH: stat PATH: no such file or directory — pass --kubeconfig PATH or set KUBECONFIG` (the release after 0.3.6; 0.3.6 waited 5 s and retried)         | the file you named is not there                                                      | pass the right path                                                                               |
| `unknown cloud provider "ibm" (have: aws, azure, gcp, onprem)`                                                                                                            | `--cloud` names an adapter this build does not carry (`0.2.1` carries only `onprem`) | use one of the names it lists, or leave `--cloud` out                                             |

## How it reads the cluster

`opodcp preflight` reads a cluster and says whether `helm install opodcp` will work. It changes nothing. The chart runs the same check as a pre-install and pre-upgrade hook Job and refuses a half-install. Run it yourself first to see the answer earlier.

```bash
opodcp preflight --kubeconfig ~/.kube/config
opodcp preflight --json | jq '.[] | select(.pass == false)'

# without the binary
docker run --rm --network host -v ~/.kube:/kube:ro \
  ghcr.io/opod-io/opodcp:0.3.6 preflight --kubeconfig /kube/config
```

Each row prints `✔` (pass), `i` (information), `!` (warning) or `✘` (fatal), its id, a message and, on a failure, a remedy after `→`. A fatal row makes the command exit `1` and names every fatal id. If the check itself cannot read the cluster (an unreachable API server, a bad kubeconfig), it retries once after 5 s and then says `preflight could not read the cluster`: that is the check failing, not a verdict on the cluster.

## Rows

The rows print in this order. A row marked "only when" is left out otherwise.

| Row               | Severity                                                                         | Passes when                                                                                                                                                                                                 | Remedy on a failure                                                                                                                                                                                                                                                                                                                                                      |
| ----------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `k8s.version`     | fatal                                                                            | Kubernetes 1.28 or newer (an N-2 policy), compared as numbers from 0.3.0 (on 0.2.1 the minor was compared as text, so a three-digit minor failed)                                                           | upgrade the cluster                                                                                                                                                                                                                                                                                                                                                      |
| `nodes.ready`     | fatal (warning with `--upgrade`)                                                 | every node is Ready; the message reads `3/4 nodes Ready`. Zero Ready nodes is always fatal                                                                                                                  | `kubectl describe node <node>`                                                                                                                                                                                                                                                                                                                                           |
| `ha.nodes`        | fatal, only when `--replicas` is above 1                                         | there are as many Ready, schedulable nodes as replicas: the chart runs each replica on a node of its own                                                                                                    | uncordon or add nodes, or lower `replicas`                                                                                                                                                                                                                                                                                                                               |
| `nodes.vendors`   | warning                                                                          | some node carries `opod.io/gpu-vendor`; the message lists the count per vendor                                                                                                                              | none needed: the control plane labels nodes itself from what each node advertises, on every reconcile. `opodcp infra up` and NFD also set it                                                                                                                                                                                                                             |
| `gpu.allocatable` | warning                                                                          | some node advertises `*/gpu`, `gpu.intel.com/*` or `tenstorrent.com/*`; the message lists the totals                                                                                                        | the chart installs the per-vendor device plugins                                                                                                                                                                                                                                                                                                                         |
| `storage.default` | warning                                                                          | a default StorageClass exists                                                                                                                                                                               | needed only for `ha.postgres.provide`, `pvc://` job checkpoints and the `0.2.1` SQLite volume (k3s: `local-path`). The control plane itself keeps nothing on a volume                                                                                                                                                                                                    |
| `runtime.nvidia`  | warning                                                                          | RuntimeClass `nvidia` exists, or no node is labelled `nvidia`                                                                                                                                               | on k3s, install nvidia-container-toolkit on NVIDIA nodes and k3s registers the class by itself. On EKS, GKE and AKS the class is absent by design: on `0.2.1` create it (see [Managed Kubernetes notes](https://opod.io/docs/control-plane-install/kubernetes/#managed-kubernetes-notes)); from `0.3.0` GPU pods are rendered without it and the warning needs no action |
| `dns.coredns`     | fatal                                                                            | at least one `k8s-app=kube-dns` pod runs in `kube-system`                                                                                                                                                   | workers join leaders by Service DNS, so cluster DNS is required                                                                                                                                                                                                                                                                                                          |
| `network.policy`  | information                                                                      | says whether the CNI enforces NetworkPolicy: enforced (naming it), not enforced (naming the network), or unknown                                                                                            | with no enforcement, `networkPolicy.enabled=true` is stored and does nothing. Install Cilium or Calico (Canal beside flannel) if the namespace must be isolated; when unknown, apply a deny-all policy in a scratch namespace and test                                                                                                                                   |
| `nodes.taints`    | information                                                                      | lists GPU nodes whose taints no pod of ours tolerates. Such nodes are measured and counted, and the placer skips them. GPU-resource taints (for example `nvidia.com/gpu`) are tolerated without any setting | the `workloads.tolerations` value to set, printed as `--set-json`                                                                                                                                                                                                                                                                                                        |
| `cp.node`         | warning (`0.3.0`)                                                                | some Ready, uncordoned node with no hard taint has no accelerator; the control plane prefers such a node                                                                                                    | add a CPU node, or tolerate a GPU-less node's taint with `tolerations`. A cluster of GPU nodes only installs and runs as it is                                                                                                                                                                                                                                           |
| `fronts.pool`     | warning, only with `--leader-pool`; fatal when the value is not a label selector | at least two Ready, unfenced nodes match the pool; the message names them                                                                                                                                   | label two nodes so the pool matches, or widen `workloads.leaderPool`                                                                                                                                                                                                                                                                                                     |
| `secrets.at-rest` | warning; information on a managed cluster                                        | every k3s server runs with `--secrets-encryption`. On EKS, GKE or AKS the API cannot say, so the row names the provider's setting                                                                           | on each k3s server: `sudo k3s secrets-encrypt enable`, then `sudo systemctl restart k3s`. The install key that seals stored connector credentials is a Secret, so it is only as private as etcd                                                                                                                                                                          |
| `substrate.lws`   | information                                                                      | says whether the LeaderWorkerSet API is already served by this cluster                                                                                                                                      | if this chart did not install that controller, install with `substrate.leaderWorkerSet.enabled=false`: Helm will not adopt a CRD another release owns (`invalid ownership metadata`). An upgrade of a release that brought its own needs nothing                                                                                                                         |
| `policy.engine`   | warning, only when Kyverno or Gatekeeper is present                              | names the engine                                                                                                                                                                                            | the pods the control plane renders meet Pod Security Standards `baseline`. `restricted` also needs `runAsNonRoot`, which the upstream vLLM and llama.cpp images do not support: exempt the release namespace from `restricted`                                                                                                                                           |
| `ns.opod`         | information                                                                      | says whether namespace `opodcp` exists already                                                                                                                                                              | `helm install --create-namespace` creates it                                                                                                                                                                                                                                                                                                                             |

### Rows a cloud adapter adds

`opodcp preflight --cloud <provider>` (default `onprem`, or `OPODCP_CLOUD`) prints the adapter's rows after the ones above. `onprem` adds none. The `aws`, `gcp` and `azure` adapters are new in `0.3.0`, built and not yet proven on a real cluster:

```bash
opodcp preflight --kubeconfig ~/.kube/config --cloud gcp --replicas 3
```

| Row                             | Severity                                                                | Passes when                                                                                                                                  | Remedy on a failure                                                                                                                                                                            |
| ------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cloud.<provider>.storageclass` | warning                                                                 | the default StorageClass uses the cloud's own CSI driver: `ebs.csi.aws.com`, `pd.csi.storage.gke.io` or `disk.csi.azure.com`                 | make the cloud's class the default (EKS `gp3`, GKE `standard-rwo`, AKS `managed-csi`)                                                                                                          |
| `cloud.<provider>.gpu-nodes`    | warning                                                                 | some node carries the cloud's accelerator label                                                                                              | add a GPU node pool                                                                                                                                                                            |
| `cloud.gcp.autopilot`           | fatal                                                                   | the cluster is not GKE Autopilot                                                                                                             | use GKE Standard: Autopilot forbids the host path the weights live in and the host driver tree the GPU probes read                                                                             |
| `lws.controller`                | information, or warning when half-installed                             | the LeaderWorkerSet CRD, webhook and controller are whole (pass), or all absent (gangs then land as per-part Deployments)                    | a half-installed controller would accept a gang and never schedule it: `helm upgrade --reset-then-reuse-values` restores it. Until it is whole, gang plans are refused with `E-GANG-SUBSTRATE` |
| `endpoints.expose`              | information; fatal with `endpoints.expose=gateway` and no ready Gateway | says how endpoints will be reached from outside and why: `one HTTPRoute per endpoint`, `one Ingress per endpoint` or `no route from outside` | install or fix the Gateway (it must be Programmed), name it with `endpoints.gateway.name` and `namespace`, or set `endpoints.expose=auto`                                                      |

A cloud adapter may add its own `cloud.<provider>.*` rows. `onprem` adds none. From `0.3.0`, `--cloud aws` adds `cloud.aws.storageclass` and `cloud.aws.gpu-nodes`, `--cloud azure` adds `cloud.azure.storageclass` and `cloud.azure.gpu-nodes`, and `--cloud gcp` adds `cloud.gcp.storageclass`, `cloud.gcp.gpu-nodes` and `cloud.gcp.autopilot`. These three adapters are built and not yet proven on a real EKS, GKE or AKS cluster.

A missing GPU is a warning, not a failure: the control plane installs and serves its console on a cluster with no GPU.

### Example output

```text
✔ k8s.version        Kubernetes v1.31.4+k3s1
✔ nodes.ready        4/4 nodes Ready
✔ nodes.vendors      vendor labels: map[nvidia:2]
✔ gpu.allocatable    allocatable accelerators: map[nvidia.com/gpu:4] on 2 node(s)
! storage.default    default StorageClass:   → no default StorageClass: the chart's optional ha.postgres and pvc:// job checkpoints need one (k3s: local-path); the control plane itself does not
✔ runtime.nvidia     RuntimeClasses: [nvidia]
✔ dns.coredns        1 CoreDNS pod(s)
…
i endpoints.expose   no route from outside — …
cluster ready for: helm install opodcp charts/opodcp -n opodcp --create-namespace
```

With `--json` the command prints one array of objects: `id`, `node` (`cluster`), `pass`, `severity` (on 0.2.1 a number: `0` information, `1` warning, `2` fatal; from 0.3.0 its name: `"info"`, `"warn"`, `"fatal"`), `message` and `remedy`.

When a fatal row fails, the last line names every fatal id, for example `error: 2 fatal check(s): k8s.version, dns.coredns — each is printed above with what to do about it`, and the exit status is `1`.

## Flags

| Flag            | Default                            | Meaning                                                                                                                |
| --------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `--kubeconfig`  | `$KUBECONFIG`                      | kubeconfig path; empty = in-cluster                                                                                    |
| `--json`        | `false`                            | JSON output                                                                                                            |
| `--namespace`   | `$OPODCP_NAMESPACE`, else `opodcp` | the namespace the chart installs into; the LeaderWorkerSet controller and the Gateway choice are read there            |
| `--cloud`       | `$OPODCP_CLOUD`, else `onprem`     | cloud provider adapter; adds its own checks. An unknown name is refused with the list of registered ones               |
| `--upgrade`     | `false`                            | a release already runs here (the pre-upgrade hook sets it): NotReady nodes are a warning, zero Ready nodes stays fatal |
| `--leader-pool` | `$OPODCP_LEADER_POOL`              | the chart's `workloads.leaderPool` label selector; adds `fronts.pool`                                                  |
| `--replicas`    | `1`                                | control-plane replicas the release runs; above 1 adds `ha.nodes`                                                       |

## The pre-install Job

`substrate.preflight=true` (the default) renders the Job `<release>-opodcp-preflight` as a Helm `pre-install,pre-upgrade` hook (weight `-5`) and as an Argo CD `PreSync` hook, so a GitOps sync that renders with `helm template` still runs it. In a fleet release it is not rendered.

What the Job does:

1. It runs the control plane's own image with `preflight`, in-cluster. On an upgrade it adds `--upgrade`. It always passes `--replicas` from the chart's `replicas`, and `--leader-pool` when `workloads.leaderPool` is set. It also gets the `endpoints.expose`, `endpoints.gateway.*` and `endpoints.ingress.*` settings, so `endpoints.expose` is judged the way the control plane will judge it.
2. It runs under its own ServiceAccount, created as an earlier hook (weight `-10`), with a ClusterRole that can only get and list nodes, namespaces, pods, StorageClasses, RuntimeClasses and Gateways — and, from 0.3.0, the Endpoints, Deployments and webhook configurations the `lws.controller` row reads (on 0.2.1 it could not read them). From 0.3.0 it also passes `--namespace` with the release's namespace; on 0.2.1 it judged `opod` whatever the release namespace was. The role and binding are deleted when the hook succeeds.
3. It honours the chart's `nodeSelector`, `tolerations` and `imagePullSecrets`, so it runs where the control plane will run. That matters on a cell where only some nodes can pull the image.
4. A read that fails right after the binding is created is retried once after 5 s.
5. `backoffLimit` is 0 and the Job is kept for 10 minutes after it finishes. Its last words go into the pod's termination message as well as its log, so they survive when the log is gone.

When Helm reports only `Job Failed`, read the pod's status or run the command yourself for the full report:

```bash
kubectl -n opodcp get pods -l app.kubernetes.io/name=opodcp -o jsonpath='{.items[*].status.containerStatuses[*].state.terminated.message}'
opodcp preflight --kubeconfig ~/.kube/config --upgrade
```

To skip the Job (for example on a cluster where a hook cannot run), set `substrate.preflight=false` and run the command yourself first.
