Docs

Advanced Tools and Troubleshooting

Diagnostic procedures and solutions for common NetBox Enterprise issues

This guide provides diagnostic procedures and solutions for issues you may encounter when running NetBox Enterprise.

Accessing Your Cluster

Most troubleshooting procedures require cluster access through either the command line or web console.

Command-Line Access

Prerequisite: NetBox Enterprise installer deployment.

Enter the cluster shell environment to use kubectl and related tools:

/var/lib/embedded-cluster/bin/netbox-enterprise shell

This shell session has kubectl preconfigured with cluster credentials and context. All subsequent kubectl commands execute within this environment.

Example session:

# Enter cluster shell
/var/lib/embedded-cluster/bin/netbox-enterprise shell

# Now kubectl commands work
kubectl -n kotsadm get pods

# Exit shell when done
exit

Web Console Access

Access the admin console in a browser at https://<your-cluster-host-or-ip>:30000/ where <your-cluster-host-or-ip> is your server hostname or IP address.

The admin console provides:

  • Configuration management
  • Log viewing
  • System status monitoring
  • Application deployment controls

Note: The admin console uses a self-signed certificate by default. Your browser will display a security warning on first access.

Getting Help

If you encounter an issue that is not covered in this guide, contact NetBox Labs support with the following information:

  • NetBox Enterprise version
  • Kubernetes cluster environment details
  • Support bundle (see Generating a Support Bundle)
  • Relevant error messages from logs

Diagnostic Tools

Support Bundles

Support bundles collect system information, configuration, and logs for troubleshooting. Generate a support bundle when reporting issues to NetBox Labs.

Command-line generation:

  1. Access your cluster from the shell
  2. Run the support bundle collector:
kubectl support-bundle /var/lib/embedded-cluster/support/host-support-bundle.yaml --load-cluster-specs

The tool runs diagnostic tests and displays results in a TUI interface. Press s to save a summary text file or q to quit. A .tar.gz bundle file is created in the current directory regardless of the option selected.

Support Bundle Output

Log Access

View container logs directly using kubectl:

kubectl logs netbox-enterprise-<pod_id> -n kotsadm

Replace <pod_id> with the actual pod identifier from your cluster.

Common Issues

Slow or Overloaded API

If NetBox stops responding during bursts of API traffic, or PostgreSQL logs too many clients errors, see Handling API Load and Rate Limiting.

Git Repository Sync Failures

Symptoms:

  • Large repositories (over 1GB) fail to sync
  • Sync operations timeout
  • Worker pods are killed with out-of-memory (OOM) errors
  • Files larger than 50MB fail to process

Cause: Default worker pod resource limits are insufficient for large repository operations.

Solution:

Increase worker pod resource allocation through the admin console:

  1. Access the admin console at https://your-cluster-host-or-ip:30000/
  2. Navigate to Config section
  3. Under Resources, select an appropriate preset:
    • Regular (up to 1.5Gi mem per replica): Standard workloads
    • Large (up to 3Gi mem per replica): Moderate to heavy workloads
    • Extra Large (up to 6Gi mem per replica): Very large repositories
    • 2x Large (up to 12Gi mem per replica): Repositories over 1GB
  4. Click Save Config
  5. Deploy the updated configuration

Verification:

Check that worker pods have restarted with new resource limits:

# Verify resource limits
kubectl -n kotsadm get deployment netbox-enterprise-worker -o yaml \
  | yq -r '.spec.template.spec.containers[] | select(.name == "netbox-worker") | .resources'

# Check worker pod status
kubectl -n kotsadm get pods -l app=netbox-enterprise-worker

# Monitor pod restart
kubectl -n kotsadm get pods -w

Test repository sync:

  1. Navigate to Operations > Integrations > Data Sources in NetBox
  2. Add or select your Git repository
  3. Click Sync and monitor progress
  4. Verify completion in the NetBox UI or worker logs

Additional steps if issue persists:

  • Use .gitignore patterns to exclude large binary files not needed for NetBox
  • Split large monorepos into smaller, focused repositories
  • Contact NetBox Labs support for specialized configuration

CERTIFICATE_VERIFY_FAILED Behind a TLS-Inspecting Proxy

Symptoms:

  • A Git or S3 data source fails to sync with SSL: CERTIFICATE_VERIFY_FAILED
  • The dashboard news feeds or a plugin such as NDX fail with the same error
  • HTTPS to the same destination works from outside NetBox

Cause:

A TLS-inspecting proxy decrypts outbound HTTPS and signs it again with its own certificate authority (CA). NetBox checks the certificate the proxy presents, not the certificate of the destination. If NetBox does not trust the proxy's CA, the request fails. The error names a certificate, but the cause is the proxy.

Trusting your internal CA is not enough. The proxy's signing CA must also be trusted, unless your internal CA is the one the proxy signs with.

Solution:

  1. Get the proxy's signing CA certificate, PEM-encoded, from the team that runs the proxy.
  2. In the Admin Console, go to Config > Show Advanced Settings > Extra CA Certificates.
  3. Paste the certificate into Additional CA Certificates. Keep the certificates that are already there and add this one after them.
  4. Click Save Config and deploy.

On a Helm install, add the certificate to spec.extraCaCertificates.

You do not need to set REQUESTS_CA_BUNDLE, AWS_CA_BUNDLE or SSL_CERT_FILE in NetBox Environment Overrides. NetBox Enterprise already points NetBox and its workers at the trust store that holds these certificates.

If the destination is internal and should not go through the proxy at all, exclude it from the proxy instead. See Excluding destinations from the proxy.

netbox-validity cannot connect to a device that offers only SHA-1 SSH algorithms

Since 2.4.0, NetBox Enterprise ships paramiko 5, the SSH library that netbox-validity uses through netmiko to reach devices. paramiko 5 removed SHA-1 key exchange (diffie-hellman-group1-sha1, diffie-hellman-group14-sha1 and diffie-hellman-group-exchange-sha1), ssh-rsa signatures with SHA-1, GSSAPI support, and diffie-hellman-group-exchange-sha256 moduli under 2048 bits. The ssh-rsa removal covers both the device's host key and RSA key login to the device. A device that offers only those cannot be reached.

Fix it on the device:

  • Turn on a SHA-2 key exchange, such as diffie-hellman-group14-sha256, ecdh-sha2-nistp256 or curve25519-sha256@libssh.org.
  • Use a host key that signs with rsa-sha2-256, rsa-sha2-512, Ed25519 or ECDSA.
  • If you use group exchange, offer moduli of at least 2048 bits.
  • For RSA key login, make the device accept rsa-sha2-256 or rsa-sha2-512.

FortiGate (FortiOS) devices need one more step. netmiko's Fortinet driver limits key exchange to a fixed list, and on paramiko 5 the only one left is diffie-hellman-group-exchange-sha256. On those devices, turning on group14-sha256 or ECDH does not help: the device must offer diffie-hellman-group-exchange-sha256, with moduli of at least 2048 bits.

Do not install paramiko 4 or netmiko[par4] to work around it. paramiko 4 has a security flaw that paramiko 5 fixes.

Excessive Log Output

Symptoms:

  • Log storage fills rapidly
  • Difficult to locate relevant error messages
  • Performance degradation due to high I/O

Cause: Debug logging is enabled in a production environment.

Solution:

Disable debug logging through the admin console:

  1. Access the admin console
  2. Navigate to Config section
  3. Find Enable Debug Logging toggle
  4. Disable the toggle
  5. Click Save Config
  6. Deploy the updated configuration

Important: Debug logging exposes detailed system information and significantly impacts performance. Only enable debug mode in non-production environments when actively troubleshooting issues.

Enabling Debug Logging (Non-Production Only)

Debug logging provides detailed operational information for diagnosing issues. Enable it only in development or test environments.

Production Warning

Never enable debug logging on a production system. It can expose sensitive data to unauthenticated users and impose a substantial performance penalty.

When enabled, this setting (custom_logging_enabled in the Admin Console) sets Diode components (Ingester, Reconciler, Auth) to DEBUG logging level, providing verbose output useful for diagnosing integration and data ingestion issues.

Steps:

  1. Access the admin console
  2. Navigate to Config section
  3. Find Enable Debug Logging toggle
  4. Enable the toggle
  5. Click Save Config
  6. Deploy the updated configuration

Debug Logging Enabled

View debug logs:

kubectl logs netbox-enterprise-<pod_id> -n kotsadm

Debug Logging Example

Disable debug logging after completing troubleshooting to restore normal performance.

Cluster Access Issues

Symptoms:

  • Cannot connect to admin console
  • kubectl commands fail
  • Cannot access NetBox web interface

Solution:

Web console access:

The admin console is available at https://your-cluster-host-or-ip:30000/ in default installations.

Command-line access:

For NetBox Enterprise installer deployments, enter the cluster shell environment:

/var/lib/embedded-cluster/bin/netbox-enterprise shell

This provides a shell with kubectl configured to interact with the embedded cluster.

Manual edits to the NetBoxEnterprise resource are reverted

Symptoms:

  • Changes made with kubectl edit netboxenterprises disappear after the next deploy
  • Configuration reverts to what the Admin Console shows

Cause: The Admin Console is the source of truth for the NetBoxEnterprise custom resource. Editing the resource directly (for example, kubectl edit netboxenterprises) is not supported. The console overwrites the resource on the next deploy, so manual edits are lost.

Solution:

Make configuration changes through the Admin Console at https://your-cluster-host-or-ip:30000/, then Save Config and deploy. For settings the console does not expose (such as valueFrom: secretKeyRef environment variables), apply them through a Helm deployment instead, where the custom resource is authoritative.

License Change versions keep appearing after a license change

Symptoms:

  • After a license renewal, an entitlement change, or a channel change, the Admin Console Version history shows a License Change version
  • Each config change made before you deploy that License Change is followed by another one
  • Deploying an older License Change fails with Rollback is not supported.
  • A new entitlement that adds Config page options, such as a tier change or Private Copilot, does not appear on the Config page

Cause: Each version in the Admin Console keeps its own copy of the license. A config change builds on the deployed version, so until you deploy a License Change, each config change carries the old license, and the Admin Console offers a new License Change to catch up. Each config change also lands above the earlier License Change. NetBox Enterprise does not support rollback, so the Admin Console blocks deploying that older version.

Solution:

  1. In Version history, deploy the newest License Change.
  2. Make your config changes after that deploy.

Older License Change versions that show Rollback is not supported. are expected and safe to ignore. After the newest License Change is deployed, config changes no longer create new License Change versions. A later license change starts the cycle again, so deploy its License Change first too.

Redis Out-Of-Memory Restart Loop

Symptoms:

  • The Redis pod restarts repeatedly under memory pressure
  • Redis is killed with OOM and re-fills memory on startup, then is killed again
  • The ingester rejects ingest with ResourceExhausted

Cause: With append-only file (AOF) persistence enabled, a restarted Redis replays its entire write log, re-filling memory immediately and triggering another OOM kill. Without a memory cap, Redis grows until the pod hits its limit.

Solution:

For operator-managed (built-in) Redis, tune memory through the Admin Console under Config > Show Advanced Settings > Redis Tuning, or through the custom resource on Helm:

  1. Set AOF (Append-Only File) Mode to Disabled. A restart then loads the compact RDB snapshot instead of replaying every write, so a crashed Redis does not re-fill memory on startup. The NetBox cache is preserved; in-flight Diode stream events are lost on crash.
  2. Set Redis Memory Cap to a percentage of the pod limit (for example, 80) and choose an eviction policy such as allkeys-lru. This requires a Redis memory limit, set via the Redis Resources preset.

The equivalent custom-resource fields (redis.aofEnabled, redis.maxMemoryPercent, redis.maxMemoryPolicy) are documented in Redis Configuration.

Changing these settings rolls the Redis pod once on the next deploy to apply the new configuration. This is expected.

Deployment Stuck in "Updating" or "Reconciling"

Symptoms:

  • The NetBoxEnterprise resource reports Reconciling or ComponentsNotReady for an extended period
  • kubectl get netboxenterprises shows READY as false after a config change

Cause: The operator processes each spec change and waits for every component to become ready before marking the cluster ready. During an image upgrade, migration, or pod roll, the resource stays in a progressing state until the rollout converges.

Solution:

Check whether the operator has caught up with the latest spec change:

kubectl -n netbox get netboxenterprise netbox \
  -o jsonpath='gen={.metadata.generation} observed={.status.observedGeneration} converged={.status.convergedGeneration}'
  • When convergedGeneration equals metadata.generation, the current configuration has fully rolled out.
  • When observedGeneration is behind metadata.generation, the operator has not yet processed the latest change.

Inspect component status and operator events to find what is still progressing:

kubectl -n netbox get netboxenterprise netbox -o jsonpath='{.status.components}' | jq
kubectl -n netbox get events --field-selector source=nbe-operator

See Status & Conditions for the full field and condition reference. If a component stays unready, check that pod's logs for the underlying failure.

Upgrade to 2.4 does not complete

On an Embedded Cluster installation, the upgrade from NetBox Enterprise 2.3 to 2.4 also upgrades Kubernetes from 1.34 to 1.35 (Embedded Cluster 2.18.1 to 2.19.9). A Helm installation does not upgrade Kubernetes, so this section does not apply to it. Two faults can stop this upgrade, each with its own fix. To find which one, check the Admin Console and NetBox:

The Admin Console and NetBox stop after the Deploy

Symptoms:

  • After a Deploy of 2.4, the Admin Console and NetBox are both unavailable.
  • kubectl commands fail with The connection to the server localhost:6443 was refused.
  • journalctl -u k0scontroller shows cgroup v1 is not supported.

Cause: Kubernetes 1.35 does not run on cgroup v1. On a cgroup v1 host, the upgrade downloads and installs the Kubernetes 1.35 binary, and then Kubernetes does not start. No preflight check stops the upgrade before this happens.

Solution:

This procedure was tested on a single node. On a cluster with more than one node, generate a support bundle and contact NetBox Labs before you reboot a node.

  1. Other software on the node, for example Docker or a security agent, must also support cgroup v2. Get approval from the owners of that software before you start.
  2. Switch the node to cgroup v2 and reboot, as described in Enable cgroup v2.
  3. After the reboot, run stat -fc %T /sys/fs/cgroup/. The output must be cgroup2fs. If the output is still tmpfs, do not continue. Send the output of cat /proc/cmdline to NetBox Labs.
  4. Wait. Kubernetes starts, and the upgrade continues by itself. In testing on a single node, NetBox 2.4 was ready about 11 minutes after the reboot. Do not run the recovery script, and do not click Deploy.
  5. If the Admin Console does not show 2.4 as deployed and Ready 30 minutes after the reboot, do not click Deploy again. In testing, a second Deploy did not recover a failed upgrade. Generate a support bundle and send it to NetBox Labs.

Each Deploy of 2.4 fails

Symptoms:

  • NetBox 2.3 continues to operate, and the Admin Console is available.
  • Each Deploy of 2.4 fails. The Admin Console log shows app-only upgrade, then will not process, then an HTTP 500 error. On an air-gap installation, the log shows autopilot plan failed: Upgrade apply has failed and an HTTP 500 error.
  • In the cluster shell, kubectl get nodes shows the node on v1.34, and kubectl get installations and kubectl get plans.autopilot.k0sproject.io show one of these states:
    • A 2.19.9 Installation in state Failed, or in state Installing on an air-gap installation, and the Plan autopilot in state ApplyFailed.
    • No 2.19.9 Installation, because someone deleted it, and the Plan autopilot in state ApplyFailed.

The script and the steps below apply only to these two states. In testing on an online installation, on a single node on Kubernetes 1.34 behind a proxy, the script and one Deploy completed the upgrade from each state. On an air-gap installation, do not follow these steps alone, because the upgrade after the script can stay at Upgrading Kubernetes. Generate a support bundle and contact NetBox Labs support. If the cluster shows a different state, for example a 2.19.9 Installation in state Installing with no Plan, generate a support bundle and send it to NetBox Labs.

Cause: The Kubernetes part of the upgrade failed, and the installer does not remove a failed upgrade. The autopilot Plan and the 2.19.9 Installation stay in the cluster. While they exist, each later Deploy fails.

In the known cases, the node could not download an upgrade file. On an online installation, this is the Kubernetes (k0s) binary, which the node downloads from https://app.enterprise.netboxlabs.com/embedded-cluster-public-files/. One known cause is a proxy that blocks the download. On an air-gap installation, the node downloads the files from a service on the node itself. See Proxy Environments.

Solution:

The recovery script below removes the failed upgrade. Then one Deploy completes the upgrade.

Before you start:

  • You must have root access on the node and access to the Admin Console.
  • The node must use cgroup v2. Run stat -fc %T /sys/fs/cgroup/. If the output is tmpfs, get approval from the owners of other software on the node, for example Docker or a security agent. Then switch the node to cgroup v2 and reboot, as described in Enable cgroup v2. After the reboot, wait until NetBox 2.3 and the Admin Console are available again.
  • On an online installation, /var/tmp must have 400 MB free space. The script downloads the k0s binary (about 260 MB) one time to test the download through the proxy. On an air-gap installation, the k0s binary comes from the air-gap bundle, so the script does not test the download.
  • Plan a maintenance window of 30 minutes. NetBox can be unavailable during the upgrade.
  • The script covers a single node only. On a cluster with more than one node, it stops. Generate a support bundle and send it to NetBox Labs.

The script changes nothing until its checks pass. It stops on a healthy cluster, on a node that already runs Kubernetes 1.35, and on any state other than the two above. Before it deletes anything, it saves a copy of each object in a new directory under /var/tmp, and it stops if a copy fails. It writes all output to /var/tmp/nbe-recover-<time>.log.

Save this script on the node as nbe-recover-failed-upgrade.sh:

#!/usr/bin/env bash
# Recover a NetBox Enterprise Embedded Cluster node after a failed 2.3 -> 2.4 upgrade.
# The failed upgrade leaves an ApplyFailed autopilot Plan and, unless someone deleted it,
# a 2.19.9 Installation in state Failed (online) or Installing (air-gap). Every later Deploy
# fails until they are removed.
#
# Run as root on the node:   sudo bash nbe-recover-failed-upgrade.sh
#
# The script does its checks first. It changes nothing unless the node runs cgroup v2, is in a
# known stuck state, and can download the k0s binary. On an air-gap installation the k0s binary
# comes from the air-gap bundle, so the script does not test the download there.
# It writes all output to /var/tmp/nbe-recover-<time>.log.
set -uo pipefail
# The log and the saved copies can hold proxy settings, so only root may read them.
umask 077
# A dropped SSH session must not stop the script between the two deletes.
trap '' HUP PIPE

STAMP="$(date -u +%Y%m%dT%H%M%SZ)"
LOG="/var/tmp/nbe-recover-$STAMP.log"
exec > >(tee "$LOG") 2>&1
TEE_PID=$!
# Close the pipe to tee and wait for it, so the last STOPPED or DONE line reaches the terminal.
finish() {
  exec >&- 2>&-
  wait "$TEE_PID"
}
trap finish EXIT

DATA_DIR="${DATA_DIR:-/var/lib/embedded-cluster}"
K="$DATA_DIR/bin/kubectl"
export KUBECONFIG="$DATA_DIR/k0s/pki/admin.conf"
PLANS="plans.autopilot.k0sproject.io"
NEED_MB=400

refuse() {
  echo "STOPPED: $*"
  echo "The script did not change the node. Send $LOG to NetBox Labs."
  exit 2
}

show_state() {
  "$K" get nodes -o wide
  "$K" get installations -o custom-columns=NAME:.metadata.name,VERSION:.spec.config.version,STATE:.status.state,REASON:.status.reason
  "$K" get "$PLANS" -o custom-columns=NAME:.metadata.name,STATE:.status.state 2>&1
}

# Download the k0s binary that the failed Plan asks for, through the proxy of the installation.
# Then compare the checksum. A proxy that changes the file fails this check.
check_k0s_download() {
  local url sha proxy tmp got code k0s_env free_mb airgap
  airgap=$("$K" get installation "$1" -o jsonpath='{.spec.airGap}') || refuse "the script cannot read the Installation $1."
  if [[ "$airgap" == true ]]; then
    echo "== This is an air-gap installation. The k0s binary comes from the air-gap bundle, so the script does not test the download."
    return
  fi
  url=$("$K" get "$PLANS" autopilot -o jsonpath='{.spec.commands[0].k0supdate.platforms.linux-amd64.url}')
  sha=$("$K" get "$PLANS" autopilot -o jsonpath='{.spec.commands[0].k0supdate.platforms.linux-amd64.sha256}')
  proxy=$("$K" get installation "$1" -o jsonpath='{.spec.runtimeConfig.proxy.httpsProxy}') \
    || refuse "the script cannot read the proxy of the Installation $1."
  [[ -n "$url" && -n "$sha" ]] || refuse "the autopilot Plan has no linux-amd64 k0s download."
  k0s_env=$(systemctl show k0scontroller -p Environment)
  echo "== Proxy settings of the k0s service: $(tr ' ' '\n' <<<"$k0s_env" | grep -i proxy | tr '\n' ' ')"
  if [[ -n "$proxy" ]] && ! grep -q 'HTTPS_PROXY=' <<<"$k0s_env"; then
    refuse "the installation uses the proxy $proxy, but the k0s service has no HTTPS_PROXY setting."
  fi
  free_mb=$(df -Pm /var/tmp | awk 'NR==2 {print $4}')
  [[ "$free_mb" -ge "$NEED_MB" ]] || refuse "/var/tmp has $free_mb MB free. The download test needs $NEED_MB MB. Make space in /var/tmp, then run the script again."
  echo "== Download test: $url through the proxy '${proxy:-none}'"
  tmp=$(mktemp /var/tmp/nbe-k0s-check.XXXXXX)
  code=$(curl -sSL ${proxy:+-x "$proxy"} -o "$tmp" -w '%{http_code}' --max-time 900 "$url")
  got=$(sha256sum "$tmp" | cut -d' ' -f1)
  rm -f "$tmp"
  echo "   HTTP status=$code sha256=$got expected sha256=$sha"
  if [[ "$code" != 200 || "$got" != "$sha" ]]; then
    refuse "the node cannot download the k0s binary. The curl error above, if there is one, gives the cause. \
Ask your network team to let this node download $url through ${proxy:-the network}. \
The file must arrive unchanged. Then run the script again."
  fi
}

[[ $EUID -eq 0 ]] || refuse "run the script as root: sudo bash $0"
cgroup_fs=$(stat -fc %T /sys/fs/cgroup/)
echo "== Control groups: /sys/fs/cgroup is $cgroup_fs"
[[ "$cgroup_fs" == cgroup2fs ]] || refuse "this node uses cgroup v1 (/sys/fs/cgroup is $cgroup_fs). \
NetBox Enterprise 2.4 runs Kubernetes 1.35, which does not start on cgroup v1. The upgrade would stop Kubernetes on this node. \
Switch the node to cgroup v2 first, as described in 'Enable cgroup v2' in the NetBox Enterprise host requirements. \
On RHEL, run 'grubby --update-kernel=ALL --args=\"systemd.unified_cgroup_hierarchy=1\"', then reboot. \
After the reboot, 'stat -fc %T /sys/fs/cgroup/' must show cgroup2fs. Then run the script again."
[[ -x "$K" && -r "$KUBECONFIG" ]] || refuse "there is no Embedded Cluster kubectl at $K. Set DATA_DIR to the data directory of the installation."

echo "== State before"
show_state

newest=$("$K" get installations --sort-by=.metadata.name -o jsonpath='{.items[-1:].metadata.name}')
version=$("$K" get installation "$newest" -o jsonpath='{.spec.config.version}')
state=$("$K" get installation "$newest" -o jsonpath='{.status.state}')
airgap_install=$("$K" get installation "$newest" -o jsonpath='{.spec.airGap}')
plan=$("$K" get "$PLANS" autopilot -o jsonpath='{.status.state}' 2>/dev/null)
nodes=$("$K" get nodes --no-headers | wc -l)
old_nodes=$("$K" get nodes -o jsonpath='{range .items[*]}{.status.nodeInfo.kubeletVersion}{"\n"}{end}' | grep -c '^v1\.34\.')
rq_ready=$("$K" -n kotsadm get pods -l app=kotsadm-rqlite -o jsonpath='{range .items[*]}{.status.containerStatuses[0].ready}{"\n"}{end}' | grep -c true)
echo "== Checks: newest=$newest version=$version state=$state airgap=${airgap_install:-false} plan=${plan:-none} nodes_on_1.34=$old_nodes/$nodes rqlite_ready=$rq_ready"

[[ "$nodes" -ge 1 ]] || refuse "kubectl cannot list the nodes. The Kubernetes API is not available on this node."
[[ "$old_nodes" -eq "$nodes" ]] || refuse "one or more nodes are not on Kubernetes 1.34. The cluster upgrade ran or is in progress."
[[ "$rq_ready" -eq 3 || ( "$nodes" -eq 1 && "$rq_ready" -ge 1 ) ]] || refuse "the admin console database (rqlite) is not ready. Wait 5 minutes, then run the script again."
failed_inst=""
# An online upgrade marks the Installation Failed. An air-gap upgrade leaves it Installing,
# and its ApplyFailed Plan is final, so no upgrade is still running.
if [[ "$version" == 2.19.9* && "$plan" == ApplyFailed \
      && ( "$state" == Failed || ( "$state" == Installing && "$airgap_install" == true ) ) ]]; then
  [[ "$nodes" -eq 1 ]] || refuse "the script does not cover a failed Plan on a cluster with more than one node."
  check_k0s_download "$newest"
  failed_inst=$newest
elif [[ "$version" == 2.18.1* && "$plan" == ApplyFailed ]]; then
  [[ "$nodes" -eq 1 ]] || refuse "the script does not cover a failed Plan on a cluster with more than one node."
  echo "== There is no 2.19.9 Installation. Only the failed autopilot Plan remains."
  check_k0s_download "$newest"
else
  refuse "the newest Installation is $version in state '$state', and the Plan state is '${plan:-none}'. This is not a known stuck state. If an upgrade is in progress, let it finish."
fi

BACKUP=$(mktemp -d "/var/tmp/nbe-recover-$STAMP.XXXXXX") || refuse "the script cannot create a directory in /var/tmp for the saved copies."
save_copy() {  # $1 = file name, rest = kubectl get arguments
  local file="$BACKUP/$1"; shift
  if ! "$K" get "$@" -o yaml > "$file" || [[ ! -s "$file" ]]; then
    refuse "the script cannot save a copy of $* in $file."
  fi
}
echo "== The script saves a copy of each failed upgrade object in $BACKUP"
[[ -z "$failed_inst" ]] || save_copy "installation-$failed_inst.yaml" installation "$failed_inst"
save_copy plan-autopilot.yaml "$PLANS" autopilot

# Once a delete is sent, it can take effect even when kubectl reports an error.
stop_after_delete() {
  echo "STOPPED: $*"
  echo "The delete may have taken effect. Do not click Deploy, and do not run the script again. Send $LOG to NetBox Labs."
  exit 3
}
if [[ -n "$failed_inst" ]]; then
  echo "== The script deletes the Installation $failed_inst"
  "$K" delete installation "$failed_inst" || stop_after_delete "the delete of the Installation $failed_inst did not complete."
fi
echo "== The script deletes the autopilot Plan"
"$K" delete "$PLANS" autopilot \
  || stop_after_delete "the delete of the autopilot Plan did not complete.${failed_inst:+ The Installation $failed_inst is deleted.}"

echo "== State after"
show_state
echo "DONE. The saved copies are in $BACKUP."
echo "Next: in the admin console, click Check for update. Then click Deploy on the newest 2.4 version one time only."

Then do these steps:

  1. On the node, run the script as root. If your SSH connection can drop, run it inside tmux or screen:

    sudo bash nbe-recover-failed-upgrade.sh
  2. Read the last lines of the output:

    • DONE: go to step 3.
    • STOPPED: the node cannot download the k0s binary: give the URL in the message to your network team. The node must be able to download that URL through the proxy, and the file must arrive unchanged. Then run the script again.
    • STOPPED: this node uses cgroup v1: switch the node to cgroup v2 as described in Enable cgroup v2, and reboot. Then run the script again.
    • A different STOPPED message: do what the message says. If it tells you to send the log, or the same message shows again, go to step 6.
  3. In the Admin Console, click Check for update.

  4. Click Deploy on the newest 2.4 version one time only. During the upgrade, the Admin Console can be unavailable for some minutes. Do not click Deploy again, and do not run the script again.

  5. Wait until the Admin Console shows the new version as deployed and Ready. In testing, this took about 10 minutes. If it does not show this after 30 minutes, go to step 6.

  6. Send these items to NetBox Labs:

    • The log file /var/tmp/nbe-recover-<time>.log. The script shows the full name of the file. If your proxy URL contains a user name and password, remove them from the log before you send it.
    • A support bundle, if the new version is not Ready.

Manual commands:

Use these commands only if the script cannot run, and only together with NetBox Labs support. They do the same deletes as the script. In the cluster shell, show the state:

kubectl get nodes
kubectl get installations
kubectl get plans.autopilot.k0sproject.io

Continue only if all of these are true:

  • There is exactly one node, and its version starts with v1.34.
  • The Plan autopilot is in state ApplyFailed.
  • The newest Installation is 2.19.9 in state Failed, or in state Installing on an air-gap installation, or there is no 2.19.9 Installation.

Save a copy of each object you delete. Replace INSTALLATION with the name of the 2.19.9 Installation:

umask 077
kubectl get installation INSTALLATION -o yaml > /var/tmp/installation-$(date +%s).yaml
kubectl get plans.autopilot.k0sproject.io autopilot -o yaml > /var/tmp/plan-autopilot-$(date +%s).yaml

Then delete them:

kubectl delete installation INSTALLATION
kubectl delete plans.autopilot.k0sproject.io autopilot

Delete only the objects that exist. If there is no 2.19.9 Installation, skip its commands. Never delete a 2.18.1 Installation. Then do steps 3 to 6 above.

Gateway Logs middleware does not exist at Startup

On the bundled Traefik gateway, you may see a brief burst of errors like middleware "<namespace>-<name>@kubernetescrd" does not exist in the gateway pod logs each time it starts. This is expected: Traefik's Gateway API provider publishes routes a moment before its CRD provider finishes indexing the request body-size Middleware, so the reference is briefly unresolved before it self-heals (typically within a second).

A short burst at startup is benign. Errors that persist past startup indicate the traefik.io Middleware CRD is missing. Install the netbox-enterprise-crds-traefik chart (Embedded Cluster installs it automatically). See Prerequisites.

Command-Line Tools Reference

NetBox Enterprise includes specialized tools for cluster management and diagnostics. All tools require cluster access as described in Accessing Your Cluster.

kubectl

Standard Kubernetes CLI for interacting with cluster resources. Included with NetBox Enterprise installer.

Common operations:

# List all pods in the kotsadm namespace
kubectl -n kotsadm get pods

# View pod logs
kubectl logs <pod-name> -n kotsadm

# Describe a resource
kubectl describe pod <pod-name> -n kotsadm

# Get deployment details
kubectl -n kotsadm get deployment <deployment-name> -o yaml

preflight

Validation tool that checks system requirements before deployment or upgrade. Included with NetBox Enterprise installer.

Manual installation:

curl https://krew.sh/preflight | bash

Usage:

# Run preflight checks
kubectl preflight <spec-file>

# Example with NetBox Enterprise spec
kubectl preflight /var/lib/embedded-cluster/support/host-preflight.yaml

Use preflight when planning upgrades or diagnosing installation issues.

support-bundle

Generates comprehensive diagnostic bundles containing logs, configuration, and cluster state. Included with NetBox Enterprise installer.

Manual installation:

curl https://krew.sh/support-bundle | bash

Usage:

# Generate support bundle
kubectl support-bundle <spec-file> --load-cluster-specs

# Example with NetBox Enterprise spec
kubectl support-bundle /var/lib/embedded-cluster/support/host-support-bundle.yaml --load-cluster-specs

The command creates a .tar.gz file in the current directory. Provide this file to NetBox Labs support when reporting issues.

Output options:

  • Press s to save a summary text file
  • Press q to quit (bundle file is still created)

k9s

Optional terminal UI for managing and viewing cluster resources interactively. Not included with installer.

Installation:

See installation instructions at k9scli.io.

Usage:

# Launch k9s
k9s

K9s provides a visual interface for common kubectl operations and real-time resource monitoring.

Advanced Configuration Reference

The Admin Console exposes additional configuration options under Show Advanced Settings. The following settings are available for specialized deployment scenarios.

Custom Object Types Limit

The max_custom_object_types setting limits the number of custom object types that can be created using the netboxlabs-netbox-custom-objects plugin. This protects database infrastructure from excessive schema modifications.

SettingDefaultDescription
max_custom_object_types50Maximum number of custom object types. Set to 0 for unlimited.

This option is visible in the Admin Console under Config > Show Advanced Settings.

Extra CA Certificates

The extra_ca_certificates setting allows uploading a custom CA certificate bundle. Use this when NetBox Enterprise needs to trust certificates signed by an internal or private certificate authority.

Common scenarios requiring custom CA certificates:

  • Self-signed certificates on external PostgreSQL
  • Self-signed certificates on external Redis with TLS
  • Self-signed certificates on S3-compatible storage (e.g., MinIO)
  • LDAPS connections using an internal CA

To configure:

  1. Access the Admin Console
  2. Navigate to Config > Show Advanced Settings
  3. Paste your PEM-encoded CA certificates into the Additional CA Certificates field
  4. Click Save Config and deploy

TLS-inspecting proxies

If a proxy inspects TLS, add the proxy's signing CA here, so that NetBox trusts the traffic the proxy signs again. See CERTIFICATE_VERIFY_FAILED Behind a TLS-Inspecting Proxy.

On Embedded Cluster, the host must trust that CA too. Install it in the host trust store before you run the installer. Do not pass --private-ca: Embedded Cluster ignores it.

Proxies Inside the NetBox Containers

Proxy settings reach the NetBox containers on their own. If the deployment has a proxy configured, HTTP_PROXY, HTTPS_PROXY and NO_PROXY are set on NetBox, the workers, Copilot, Diode, Hydra and the migration Jobs. NetBox uses them for Git and S3 data source synchronization, the dashboard news feeds, and plugins such as NDX. Nothing needs to be enabled for this.

Webhooks are the exception. NetBox sends webhooks with the proxies in its own HTTP_PROXIES setting and ignores the proxy environment variables. NetBox Enterprise leaves HTTP_PROXIES empty, so webhooks go to their destination directly. If a webhook destination can only be reached through the proxy, set HTTP_PROXIES.

On Embedded Cluster and other KOTS installs, the proxy comes from the --http-proxy and --https-proxy installer flags and is shown read-only in the Admin Console. Direct Helm installs set it through global.replicated.

NO_PROXY always carries cluster-internal destinations — localhost, the in-cluster DNS suffixes and the RFC 1918 ranges — so pod-to-pod and Service traffic never goes through the proxy.

NetBox Enterprise 2.4.0 removes the Configure NetBox to Use Proxies checkbox. It had no effect from 2.0.0 to 2.3.x. There is no setting that turns the proxy off for NetBox alone. To keep some NetBox traffic off the proxy, see Excluding destinations from the proxy.

Before 2.3.0

In 2.0.0 to 2.2.x, NetBox and its workers do not use the proxy environment variables, so their outbound traffic goes directly to its destination. NO_PROXY has no effect on them. On those versions, set HTTP_PROXIES, and use a proxy router to keep destinations off the proxy.

Set HTTP_PROXIES

HTTP_PROXIES is the NetBox setting for the proxies that NetBox uses for its own outbound requests. Set it to send webhooks through the proxy.

  1. In the Admin Console, go to Config > Show Advanced Settings.

  2. Add the following to NetBox Python Configuration Overrides. Use the same proxy URL as the installer flags.

    HTTP_PROXIES = {
        'http': 'http://proxy.example.com:3128',
        'https': 'http://proxy.example.com:3128',
    }
  3. Click Save Config and deploy.

On a Helm install, put the same Python in spec.netbox.config.customPythonConfig.

HTTP_PROXIES takes precedence over NO_PROXY. When it is set, NetBox sends webhooks, Git and S3 data source synchronization and the dashboard news feeds through the proxy, even if the destination is listed in NO_PROXY. If a destination must stay off the proxy, add a proxy router as well.

Excluding Destinations From the Proxy

Add the destinations to NO_PROXY:

  • On Embedded Cluster, pass them to the installer with --no-proxy. The proxy is an install-time setting. To change it, run the installer again with the new flags. See Proxy Environments.
  • On a Helm install, set global.replicated.noProxy.

NetBox Enterprise adds your entries to the cluster-internal defaults.

For an S3 data source, list the host name of the S3 endpoint, not its IP range. The S3 client does not match a destination against an IP range such as 10.20.0.0/16.

If you have set HTTP_PROXIES, NO_PROXY alone keeps nothing in NetBox off the proxy. Add a proxy router as well.

Proxy Router

A proxy router is a Python class that chooses the proxy for each request NetBox makes. NetBox reads it from the PROXY_ROUTERS setting. The router below sends the hosts in BYPASS directly and every other request through HTTP_PROXIES.

Add it to NetBox Python Configuration Overrides, together with HTTP_PROXIES:

HTTP_PROXIES = {
    'http': 'http://proxy.example.com:3128',
    'https': 'http://proxy.example.com:3128',
}


class BypassProxyRouter:
    """Send the hosts in BYPASS directly, and everything else through HTTP_PROXIES."""

    # Hosts that NetBox must reach without the proxy.
    # An entry that starts with a dot matches that domain and every subdomain.
    BYPASS = ('git.example.com', '.internal.example.com')

    def route(self, url=None, protocol=None, context=None):
        from urllib.parse import urlparse
        from django.conf import settings

        host = (urlparse(url).hostname or '') if url else ''
        for entry in self.BYPASS:
            if host == entry.lstrip('.') or (entry.startswith('.') and host.endswith(entry)):
                return {'http': None, 'https': None}
        return settings.HTTP_PROXIES


PROXY_ROUTERS = [BypassProxyRouter]

Put the same hosts in NO_PROXY too. The Git client prefers the proxy environment variables to the proxy that the router chooses, so the router alone does not keep Git traffic off the proxy.

This table shows how NetBox 2.4.0 reaches a host that should stay off the proxy, when HTTP_PROXIES is set:

DestinationHost in NO_PROXY onlyHost in BYPASS onlyHost in both
Git data sourceProxyProxyDirect
S3 data sourceProxyDirectDirect
WebhookProxyDirectDirect
Dashboard news feedProxyDirectDirect

NetBox documents HTTP_PROXIES and PROXY_ROUTERS in its system configuration reference.

Dashboard News Feeds

The NetBox dashboard loads two news feeds from the internet:

FeedURL
NetBox Newshttps://api.netbox.oss.netboxlabs.com/v1/newsfeed/
Enterprise Newshttps://netboxlabs.com/docs/feeds/customer-messages.xml

If the proxy blocks these hosts, the feeds do not load. Allow both hosts on the proxy. In 2.0.0 to 2.2.x, NetBox fetches the feeds directly, not through the proxy. Where direct traffic is dropped, the dashboard can hang until you set HTTP_PROXIES.

On this page