CLI Reference

CLI Reference

Run, validate, reload, and probe Ferrum Edge v0.9.21. A subcommand is required.

Subcommands

CommandPurpose
runStart the gateway
validateValidate config and startup security without serving traffic
reloadSend SIGHUP to a running gateway (Unix only)
healthProbe the admin API: readiness by default, liveness with --live
versionPrint version and build target
ambient-udp-preflightOne-shot privileged Ambient UDP node preflight, run by the Helm chart as an init container

Invoking ferrum-edge with no arguments prints usage and exits nonzero. Environment-based Docker, systemd, and shell startup must invoke ferrum-edge run.

run

FlagMeaning
--settings PATH / -sOperational settings (ferrum.conf)
--spec PATH / -cGateway resources YAML/JSON; a localized mesh document for file-protocol mesh validation
--mode MODE / -mdatabase, file, cp, dp, mesh, injector, node_agent, migrate
--verbose / -vRepeat for info, debug, or trace
--fips-mode MODEoff (default) or enforce; enforcement requires a FIPS build. Set it here or in FERRUM_FIPS_MODE: a value only in ferrum.conf arrives too late and is refused
bash
ferrum-edge run
ferrum-edge run --settings /etc/ferrum/ferrum.conf --spec /etc/ferrum/resources.yaml
ferrum-edge run --spec resources.yaml --mode file -vv
FERRUM_MODE=database ferrum-edge run

--spec sets only the resources path (FERRUM_FILE_CONFIG_PATH). File mode is inferred from it only when no --mode flag, FERRUM_MODE environment variable (including external secret sources), or ferrum.conf value selects a mode.

validate

FlagMeaning
--settings PATH / -sOperational settings (ferrum.conf)
--spec PATH / -cGateway resources YAML/JSON; a localized mesh document for file-protocol mesh validation
--mode MODE / -mdatabase, file, cp, dp, mesh, injector, node_agent, migrate
--verbose / -vRepeat for info, debug, or trace
--fips-mode MODEoff (default) or enforce; enforcement requires a FIPS build. Set it here or in FERRUM_FIPS_MODE: a value only in ferrum.conf arrives too late and is refused
--allow-empty-namespaceAccept a document whose namespaced resources are all filtered out by FERRUM_NAMESPACE (exit 0 with a warning instead of exit 1)

Validation checks settings, external secrets, schema version, resource and plugin fields, route uniqueness, references, namespace filtering, and startup security. File-protocol mesh documents are supported with -m mesh. Exit status is 0 on success and 1 on failure.

bash
ferrum-edge validate --mode file --spec resources.yaml
ferrum-edge validate --settings ferrum.conf --spec resources.yaml
FERRUM_MESH_CONFIG_PROTOCOL=file ferrum-edge validate --mode mesh --spec mesh.yaml

Full gateway resource files require version: "1". Validation uses the same admission rules as run without binding sockets, connecting to a database or control plane, or applying configuration. Mesh validation also checks workload identity, so supply the same SVID or CA settings you use for run.

reload

bash
ferrum-edge reload
ferrum-edge reload --pid 42195

Without --pid / -p, the CLI finds the running ferrum-edge process with pgrep, excluding itself; with several instances it lists their PIDs and asks you to choose. --pid 0 and the CLI's own PID are rejected.

SIGHUP hot-reloads file mode, and mesh mode when its config comes from a local file or xDS. A valid file is swapped in atomically without dropping connections; an invalid one keeps the last good configuration. Other modes log the signal and ignore it: use database polling, control-plane push, or a rolling restart.

health

bash
ferrum-edge health          # readiness: GET /health
ferrum-edge health --live   # liveness: GET /live
ferrum-edge health --settings /etc/ferrum/ferrum.conf
ferrum-edge health --host 127.0.0.1 --port 9000
ferrum-edge health --tls
ferrum-edge health --tls --tls-no-verify   # self-signed admin certificate, lab use only
FlagMeaning
--settings PATH / -sferrum.conf used to infer the admin host and ports; environment variables take precedence
--port PORT / -pAdmin port; defaults to FERRUM_ADMIN_HTTP_PORT (9000), or FERRUM_ADMIN_HTTPS_PORT (9443) with TLS
--host HOSTAdmin host; defaults to the effective admin bind address (0.0.0.0 probes 127.0.0.1, :: probes ::1)
--tlsConnect over HTTPS; selected automatically when FERRUM_ADMIN_HTTP_PORT=0 and no --port is given
--tls-no-verifySkip certificate verification for self-signed or private-CA admin certificates
--liveProbe liveness (GET /live) instead of readiness (GET /health)

Exit status is 0 for HTTP 200 and 1 for anything else, including connection refused and timeouts. /health returns 503 until the gateway is ready, so point readiness probes at it; /live returns 200 whenever the process and admin listener are up, so liveness probes never restart-loop a pod that is alive but not yet ready.

yaml
livenessProbe:
  exec:
    command: ["/app/ferrum-edge", "health", "--live"]
readinessProbe:
  exec:
    command: ["/app/ferrum-edge", "health"]

The binary probe works with loopback-bound admin listeners and distroless images.

version

bash
ferrum-edge version
# ferrum-edge 0.9.21 (aarch64-apple-darwin)
ferrum-edge version --json
# {"version":"0.9.21","target":"aarch64-apple-darwin"}

ambient-udp-preflight

The Helm chart runs this privileged command as an init container in the Ambient DaemonSet pod, so it completes before the steady-state proxy starts. It retires predecessor UDP placements on the node and publishes the cleanup proof the proxy requires, or exits nonzero without publishing anything. It does not start gateway listeners.

FlagMeaning
--settings PATH / -sOperational settings (ferrum.conf)
--timeout-seconds NTime limit before failing closed; default 300, clamped to 1–3600
--host-proc-root PATHProcfs root for target PID reads; the chart mounts the host /proc read-only on this container and passes /host/proc
--verbose / -vRepeat for info, debug, or trace

See the preflight reference for host mounts and capabilities.

Configuration Precedence

  1. CLI flags (--settings, --spec, --mode, --fips-mode, --verbose)
  2. Environment variables (FERRUM_CONF_PATH, FERRUM_FILE_CONFIG_PATH, FERRUM_MODE, FERRUM_FIPS_MODE, FERRUM_LOG_LEVEL), including _FILE and cloud secret sources
  3. Selected ferrum.conf
  4. Smart path discovery
  5. Built-in defaults

Settings discovery checks ./ferrum.conf, ./config/ferrum.conf, and /etc/ferrum/ferrum.conf. Resource discovery checks ./resources.yaml, ./resources.json, their ./config/ equivalents, then /etc/ferrum/config.yaml and /etc/ferrum/config.json.

Full v0.9.21 CLI reference · Running modes