Reference
opodcp CLI
Every opodcp command and flag, with its type, default and a runnable example — install, preflight, audit, serve, doctor, keys, tokens, endpoints, models, scenarios, backup, restore, licence and more.
opodcp is one binary: the control plane itself (serve) and the commands that drive it. It ships inside the image.
docker run --rm ghcr.io/opod-io/opodcp:<version> -h # every command
docker run --rm ghcr.io/opod-io/opodcp:<version> endpoint autoscale -h # one command's purpose, flags and examples
kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor # inside the running pod-h on any command prints its purpose, its usage lines, its flags and examples, and exits 0. A command made of verbs (key, endpoint, model, …) prints its help when the verb is missing. Exit status is 0 done, 1 the command failed, 2 an unknown command or verb. From the release after 0.3.6, 2 is also every usage error — a bad flag or value, a missing or extra argument — said in one line on stderr, error: <what is wrong> — opodcp <command> -h for every flag; before, a missing argument exited 1 and a bad flag printed the whole help on stdout. Flags are listed as --name, and help screens say in words what they used to cite by an internal number.
Flags take one dash or two (-f and --f are the same) and go before the positional arguments: opodcp key create --endpoint chat ci-bot, not opodcp key create ci-bot --endpoint chat. Only restore accepts its file on either side of --wipe. A duration is Go's form: 90s, 20m, 720h.
Version
This page describes 0.3.6. endpoint policy --load-refresh is new in 0.3.3. From 0.3.1 the --namespace defaults are opodcp (opodcp-audit for audit); 0.3.0 used opod and opod-audit. The 0.2.1 binary has infra, preflight, audit, serve, doctor, key, apply, verify, backup, restore, runbook, images, selfcheck, licence, node-agent and version. These are new in 0.3.0: token, endpoint, door, preview, node, nodes, model, store, secrets, ha, openapi and completion, and the flags preflight --leader-pool, preflight --replicas and serve --mode.
In short
One binary does it all. On a laptop or a jump host, opodcp installs a cluster on bare machines, checks that a cluster is ready, and drives a running control plane through its API. In the control plane's pod, opodcp serve is the control plane itself, and opodcp doctor says what is wrong with it.
How to read this page
- Each section is one command or one family of verbs. Its table lists every flag with its type, its default and what it does, followed by runnable examples.
- Commands that call the API share
--cpand--token, set once in Talking to a control plane. - A command or flag that is new in 0.3.0 is listed in the Version note above.
-hon any command prints the same flags from the binary you hold. When this page and-hdisagree,-his right for your version.
A worked example, end to end
From bare machines to a verified endpoint, with commands that are all in 0.2.1:
# 1. bare machines → a k3s cluster (skip both on EKS, GKE or AKS)
opodcp infra plan -f machines.yaml # host facts and the host gate; changes nothing
opodcp infra up -f machines.yaml # k3s server and agents, labels, kubeconfig
# 2. is the cluster ready for the chart? (infra up wrote the kubeconfig to ~/.opodcp/<cell>/kubeconfig)
export KUBECONFIG=~/.opodcp/prod-east/kubeconfig
opodcp preflight
# 3. install, then check from inside the pod
helm install opodcp oci://ghcr.io/opod-io/charts/opodcp -n opodcp --create-namespace --set cell.name=prod-east
kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor
# 4. point the CLI at the control plane, once per shell
export OPODCP_URL=https://cp.example.com
export OPODCP_TOKEN="$(kubectl -n opodcp get secret opodcp-admin -o jsonpath='{.data.token}' | base64 -d)"
# 5. create an endpoint from a scenario, wait for it, and prove it answers
opodcp apply -f scenario.yaml
opodcp verify -f scenario.yaml --out report.json
# 6. a key for the first client; the key alone goes to stdout
opodcp key create --endpoint chat-rag --expires-in 720h first-app > first-app.keyThe scenario file is the one in Create an endpoint → From the CLI. Each command exits 0 when it is done and 1 when it failed, so the block runs as a script with set -e.
Talking to a control plane
Every command that calls the API takes the same two flags.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--cp | string | $OPODCP_URL, else http://127.0.0.1:8080 | the control plane's URL |
--token | string | $OPODCP_TOKEN, else $OPODCP_ADMIN_TOKEN | the bearer token: a user's session token, the admin token or a machine token |
--ca | file | the system's roots | a PEM file of the CA that signed the control plane's certificate, for a private CA. Arrives in the release after 0.3.6 |
The commands that take them: apply, verify, preview, key create, key revoke, token *, node label, nodes, endpoint *, model * and secrets sync. Inside the control plane's own pod the admin token is already in the environment. A token default is never printed on a help screen.
# from a laptop, once per shell
export OPODCP_URL=https://cp.example.com
export OPODCP_TOKEN="$(cat ~/.opod/cp.token)"
opodcp nodes # uses both variables
opodcp nodes --cp http://localhost:8080 --token "$ADMIN" # flags win over the variables
opodcp nodes --cp https://cp.example.com --ca ./cp-ca.pem # a control plane behind a private CAFrom the release after 0.3.6, a failed call says what failed, why and what to do, on stderr with exit 1:
| What happened | What it prints |
|---|---|
| no token was sent (401) | <verb>: the control plane at <url> needs a token and none was sent — pass --token or set OPODCP_TOKEN; the admin token is Secret opodcp-admin in namespace opodcp (kubectl …) |
| the token was not accepted (401) | <verb>: the control plane at <url> did not accept the token (<reason>) — pass --token or set OPODCP_TOKEN; the admin token is Secret opodcp-admin in namespace opodcp (kubectl …) |
| the token's role may not do it (403) | <verb>: the control plane refused it for this token (<reason>) — use a token whose role may do this … |
| the planner refused it | <verb>: <reason> [E-…], then would pass: … and, when the refusal names a Helm value, set: --set … |
| it changed since it was read (409) | <verb>: <reason>, then it changed since it was read, or a run holds it — read it again and retry |
| the answer is not the control plane's JSON (a proxy page, an empty 5xx) | <verb>: the server at <url> answered HTTP 502, not the control plane's JSON — is --cp the control plane? (it said: …) |
| nothing answered | <METHOD> <path>: no control plane at <url> (<cause>) — pass --cp URL or set OPODCP_URL |
| the certificate is not trusted | <METHOD> <path>: the certificate of <url> is not trusted (…) — pass --ca FILE, the CA that signed it |
| no answer in 150 s | after 10 s, waiting for the control plane at <url> to answer <METHOD> <path>… (gives up after 2m30s); then no answer from <url> in 2m30s — the control plane may be overloaded or the tunnel down (opodcp doctor --cp <url>) |
Before it, these printed the route, the status and the raw JSON body (/api/v1/nodes: 401 {"code":"unauthorized",…}) or Go's bare dial or certificate error.
JSON output
From the release after 0.3.6, every list and show verb that talks to a control plane takes --json: nodes, endpoint placement | autoscale | kv | policy | expose | speculative, door routes, preview, apply, doctor, token ls | create, key create, model versions and secrets sync. Stdout is then the control plane's answer as JSON and nothing else; a sentence a person reads (… set, plan revision 4, already … — nothing changed, next: …) goes to stderr. The exit code is the same as without --json. In 0.3.6 only token ls and model versions (and the infra, preflight and audit reports) take it.
opodcp endpoint kv --json chat | jq '.workers[].kvOffload'
opodcp doctor --json | jq -r '.[] | select(.ok | not) | .port'Install and inspect a cluster
infra plan | up | verify | down
Build a k3s cell on bare machines over SSH. See Bare machines. Every verb takes the same flags.
| Flag | Type | Default | Meaning |
|---|---|---|---|
-f | string | machines.yaml | the inventory file |
--local | bool | false | the server is this machine: its steps run here, the agents over SSH |
--state | string | ~/.opodcp/<cell> | the state directory: the run log and the kubeconfig |
--json | bool | false | print the run as JSON on stdout |
--timeout | duration | 20m | the limit for each remote command |
--yes | bool | false | skip the confirmation of down |
--known-hosts | string | ~/.opodcp/known_hosts | the SSH known_hosts file the installer keeps; a machine may also pin hostKey in the inventory |
--strict-host-keys | bool | false | refuse a host whose key is neither pinned nor already known (no trust on first use) |
plan gathers facts and runs the host gate with no change. up converges. verify runs the host gate and then, once a kubeconfig exists in the state directory, the cluster preflight. down uninstalls k3s from every machine after it asks.
opodcp infra plan -f machines.yaml
opodcp infra up -f machines.yaml --local --strict-host-keys --timeout 30m
opodcp infra verify -f machines.yaml --json > verify.json
opodcp infra down -f machines.yaml --yespreflight
Is this cluster ready for helm install opodcp? Every flag and every row is on Preflight: --kubeconfig (string, $KUBECONFIG), --json (bool), --namespace (string, $OPODCP_NAMESPACE, else opodcp), --cloud (string, $OPODCP_CLOUD, else onprem), --upgrade (bool), --leader-pool (string, $OPODCP_LEADER_POOL) and --replicas (int, 1).
opodcp preflight --kubeconfig ~/.kube/config
opodcp preflight --replicas 2 --leader-pool opod.io/pool=fronts
opodcp preflight --json | jq '.[] | select(.pass == false)'audit
A read-only idle-VRAM report on any cluster. It needs no licence, and it removes everything it creates.
From the release after 0.3.6 audit prints one line per sample, and Ctrl-C says it wrote no report and that the probe namespace was removed.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--kubeconfig | string | $KUBECONFIG | kubeconfig path; empty = in-cluster |
--namespace | string | opodcp-audit | the throwaway namespace for the probe pods, created and removed |
--duration | duration | 60s | how long to sample; one sample every 10 s |
--price | float | 0 | your price per GPU-hour, to price the idle VRAM; 0 = GPU-hours only |
--json | bool | false | JSON output |
--keep | bool | false | leave the probe pods and the namespace in place |
opodcp audit --kubeconfig ~/.kube/config
opodcp audit --duration 5m --price 2.10 --json > audit.jsonaudit retention
How many days the control plane keeps its audit records, read or set through GET and PUT /api/v1/audit/retention. It arrives in the release after 0.3.6; on 0.3.6, use the API or the console's Audit log page. opodcp audit with no verb is still the idle-VRAM report above.
| Form | Flag | Type | Default | Meaning |
|---|---|---|---|---|
audit retention or audit retention get | --json | bool | false | print {days, keepAll}; the default is 90 days |
audit retention set DAYS | — | 1 to 3,650 days. Setting needs an admin's --token. The same number again says already 90 days — nothing changed and sends nothing | ||
audit retention set DAYS | --yes | bool | false | a lower number deletes the older records within 10 minutes, so it asks [y/N] on a terminal; without a terminal it refuses and names the command with --yes |
When the never-trim mode is on (keepAll), both forms say so: nothing is deleted, whatever the days say. The trim and what follows its window are on Audit.
opodcp audit retention
# audit records are kept 90 days; the trim runs every 10 minutes
# change it: opodcp audit retention set 180
opodcp audit retention set 365
opodcp audit retention set --yes 30 # lower: records older than 30 days go within 10 minutes
opodcp audit retention --json | jq .daysRun and check
serve
The control plane. It reads its settings from OPODCP_* variables; the chart is how it is normally started. serve -h lists every variable it reads, and Configuration explains each one.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--mode | string | $OPODCP_MODE, else cell | cell manages this cluster; fleet reads the cells in OPODCP_FLEET_CELLS and manages none. See Fleet |
OPODCP_ADDR=:9090 OPODCP_CELL=lab KUBECONFIG=~/.kube/config opodcp serve
OPODCP_FLEET_CELLS='[{"name":"lab","url":"https://lab.example.com","tokenFile":"lab.token"}]' opodcp serve --mode fleetdoctor
Every port and check: embedded or connected, green or red. See Doctor.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--cp | string | $OPODCP_URL, else this machine's OPODCP_ADDR on localhost | the control plane to ask, as every other command spells it (is new in 0.3.0) |
--url | string | the same | the same as --cp, its older name; the only spelling on 0.2.1 |
--token | string | $OPODCP_TOKEN, else $OPODCP_ADMIN_TOKEN (0.3.6: $OPODCP_ADMIN_TOKEN only) | the admin token for that control plane |
--ca | string | the system's roots | the CA of a private certificate (the release after 0.3.6) |
--local | bool | false | ask no running control plane; report only what this process can see |
A control plane you name with --cp, --url or OPODCP_URL that does not answer is an error that ends for what this machine alone can see: opodcp doctor --local. Only the default address falls back to a local report. In 0.3.6 --cp fell back too; the fix arrives in the release after 0.3.6.
opodcp doctor --cp https://cp.example.com --token "$ADMIN" # --url on 0.2.1
kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor
opodcp doctor --localCommands with no flags
| Command | Purpose |
|---|---|
opodcp runbook [port] | the runbook: every doctor row's symptom, cause and remedy; with a port name, that port's entry only |
opodcp openapi | the API's OpenAPI 3.1 document, YAML on stdout. A running control plane serves the same document at GET /api/v1/openapi.json |
opodcp images matrix | the engine × vendor image matrix the executor uses, as YAML: each pair's configured image, or TARGET, and the telemetry probes |
opodcp selfcheck | can this binary render, deep-copy and reconcile what an apply needs, against a loopback API; it needs no cluster |
opodcp version | version and commit |
opodcp completion bash|zsh|fish | a shell completion script for every command and verb |
opodcp runbook state
opodcp runbook > RUNBOOK.md
opodcp openapi > openapi.yaml
opodcp images matrix
opodcp selfcheck
opodcp version
eval "$(opodcp completion bash)" # ~/.bashrc (bash 3.2, the macOS default, cannot source <(…))
source <(opodcp completion zsh) # ~/.zshrc
opodcp completion fish | source # ~/.config/fish/config.fishEndpoints
preview, apply, verify
| Command | Flag | Type | Default | Meaning |
|---|---|---|---|---|
preview | -f | string | none (required) | the create body as JSON, {name, model, plan}: what POST /api/v1/endpoints takes; from the release after 0.3.6 also a scenario document, judged as apply --dry-run judges it |
apply | -f | string | none (required) | a scenario document, YAML or JSON |
apply | --dry-run | bool | false | judge the file as apply would and write nothing (the release after 0.3.6) |
verify | -f | string | none (required) | the same scenario document |
verify | --out | string | "" | write the JSON report to this file |
preview is the create's dry run: the claims, the nodes the leader and doors are pinned to, and the advisories. It writes nothing. apply creates or updates the endpoint the scenario names, and from the release after 0.3.6 ends with next: opodcp verify -f FILE. apply --dry-run previews a new endpoint with POST /api/v1/endpoints/preview and checks an existing endpoint's plan with PUT /api/v1/endpoints/{id}/plan?dryRun=true, so its own claims are not counted twice; it does not apply a setup block. verify waits for it to serve, sends a chat and runs the scenario's verify block (balance, autoscale). See Create an endpoint.
opodcp preview -f chat.json
opodcp apply --dry-run -f scenario.yaml # the file you apply, judged; nothing written (the release after 0.3.6)
opodcp apply -f scenario.yaml --cp https://cp.example.com
opodcp verify -f scenario.yaml --out report.jsonendpoint create
Arrives in the release after 0.3.6. endpoint create NAME builds the body the console's create form sends, asks the create's dry run (POST /api/v1/endpoints/preview), prints where each worker lands, and then creates. A refusal is the preview's, with its code and what would pass, and nothing is created. Without --node the control plane places it (auto); with --node the one worker is yours to shape.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--model | string | none (required) | the catalog model id |
--node | string | "" | place the worker on this node (explicit); empty = auto |
--engine | string | "" | vllm, llamacpp, sglang …; empty = the catalog's choice |
--shared | bool | false | pack the worker on one card by a VRAM budget |
--budget-gb | int | 0 | with --shared: the VRAM budget, GB (required then) |
--gpu | int | 0 | with --shared and --node: the card the budget goes on |
--tp | int | 1 | with --node: tensor parallel over this many cards |
--replicas | int | 1 | with --node: copies of the worker |
--dry-run | bool | false | print the preview and create nothing |
--json | bool | false | print the created endpoint (or, with --dry-run, the preview) as JSON |
opodcp endpoint create --model qwen2.5-7b --dry-run chat # where it would land
opodcp endpoint create --model qwen2.5-7b chat # auto placement
opodcp endpoint create --model qwen2.5-7b --node node-a --engine vllm --tp 2 chat
opodcp endpoint create --model qwen2.5-0.5b-gguf --shared --budget-gb 4 --node node-c --gpu 1 smallendpoint rollout | reform | doors | placement | autoscale
Each verb takes one endpoint NAME (or id) after its flags.
| Verb | Flag | Type | Default | Meaning |
|---|---|---|---|---|
rollout | --note | string | "" | the one-line reason the run records |
rollout | --wait | bool | false | follow the run to its end; exit non-zero unless it succeeded. From the release after 0.3.6 it prints each step as it changes; Ctrl-C prints stopped waiting; run <id> continues on the control plane, and a --timeout that runs out says the same — the run is never stopped by the CLI |
rollout | --timeout | duration | 20m | with --wait only: how long to follow the run |
reform | — | re-form the endpoint's gangs (the console's Shards → Re-form). An endpoint with no gang says so and sends nothing (the release after 0.3.6) | ||
doors | --replicas | int | 0 | pin the door count; 0 = follow the workers: max(2, ⌈units/4⌉), a unit = one worker or one gang (a gang counted per part until the release after 0.3.6) |
doors | --max | int | 0 | cap a count that follows the workers; 0 = the default, 8 |
placement | — | print the node of the leader and of each door, and the rule that chose it |
endpoint doors … NAME on|off turns front doors on or off through the plan's gateways block. endpoint rollout starts a verified rollout of the stored plan, as the console's Roll out plan… does.
opodcp endpoint rollout --wait --note 'objects lost in a rebuild' chat
opodcp endpoint rollout --wait --timeout 45m --note 'new vLLM image' chat
opodcp endpoint reform chat
opodcp endpoint doors --max 4 chat on
opodcp endpoint doors --replicas 3 chat on
opodcp endpoint doors chat off--replicas pins the door count and --max caps a count that follows the workers, so the two together are refused, and so is either one with off. In 0.3.6 the extra flag is dropped without a word; the refusal arrives in the release after 0.3.6.
opodcp endpoint placement chatendpoint autoscale NAME with no flags prints the autoscaling policy, who scales the endpoint and why it is held. Each flag you give changes one plan field and only that one, as the console's Edit policy does. See Autoscaling for the rules and limits.
| Flag | Type | Plan field | Meaning |
|---|---|---|---|
--floor | int | autoscale.floor | minimum workers (or gangs); 0 = may scale to zero |
--max | int | autoscale.max | maximum workers (or gangs); 0 = autoscaling off |
--unit | string | autoscale.unit | workers or gangs |
--target-inflight | int | autoscale.targetInflight | in-flight requests one worker carries before another is added |
--idle | int | autoscale.idleSeconds | idle seconds before a worker is parked |
--kv-pressure | int | autoscale.kvPressurePct | grow when the busiest worker's KV cache reaches this percent; 0 = off |
--sleep | int | autoscale.sleepSeconds | idle seconds before the engine sleeps (vLLM); 0 = no sleep tier |
--sleep-card | string | autoscale.sleepCard | keep or free: what a sleeping worker of a shared plan does with its card |
--ttft-budget | int | autoscale.ttftBudgetMs | TTFT p95 budget in ms; over it the endpoint grows; 0 = none |
--wake-slo | int | autoscale.wakeSloMs | advisory wake target in ms; 0 = none |
--grant-headroom | int | autoscale.grantHeadroom | workers reserved beyond what runs, for KEDA during an outage; 0 = the default, 1 |
--scale-in | string | autoscale.scaleIn | drain (the default: finish running requests first) or now (stop at once; clears --drain) |
--drain | int | autoscale.drainSeconds | seconds a stopped worker may spend finishing its requests; 0 = the default, 120 |
--growth-file | string | autoscale.growth | a YAML or JSON list of growth shapes, tried in order: name, vendor, max, vramBudgetGb, flags, parallelism, image; an empty list removes them |
Every flag defaults to "unchanged": a flag you do not give leaves its field as it is.
opodcp endpoint autoscale chat # print only
opodcp endpoint autoscale --floor 0 --max 4 --sleep 300 chat # scale to zero, sleep tier first
opodcp endpoint autoscale --target-inflight 4 --kv-pressure 80 --ttft-budget 800 chat
opodcp endpoint autoscale --scale-in drain --drain 300 chat
opodcp endpoint autoscale --growth-file shapes.yaml chat# shapes.yaml: grow on NVIDIA first, then on AMD cards with a smaller budget
- { name: a6000, vendor: nvidia, max: 4 }
- { name: radeon, vendor: amd, max: 2, vramBudgetGb: 20, flags: { ctx: "8192" } }endpoint kv | policy | expose
Each prints what is stored when you give no flags. Each flag you give changes one field and only that one. A flag you do not give leaves its field as it is, and --cp, --token and --ca are not changes: in 0.3.6 endpoint kv with only those rewrote the plan unchanged, and from the release after 0.3.6 it only reads. The control plane judges the write as it judges any plan or policy write, and refuses it with an error code. A plan change rolls the endpoint like any plan edit.
From the release after 0.3.6 the CLI checks every word value (--tier, --events, --isolation, --prefix-affinity, --prefix-block-tier, --vertex, --method) and --tokens (1–16) before it sends a request, so a typo is the error even when the control plane is down. A flag that sets the value already stored sends no write and prints already as given — nothing changed; endpoint doors, endpoint autoscale and door routes do the same.
endpoint kv NAME changes the endpoint's KV cache settings. The tier and precision flags apply to every worker, unless you name one worker with --worker or one gang with --gang. See KV cache and KV cache tiers.
| Flag | Type | Plan field | Meaning |
|---|---|---|---|
--worker | int | — | the worker index the tier and precision flags change; -1 (the default) = every worker |
--gang | string | — | change this gang's tier instead; a gang's sizeGb is its total, split over its ranks |
--tier | string | workers[].kvOffload.tier | cpu, disk, peer or auto; none removes the tier |
--size-gb | int | workers[].kvOffload.sizeGb | the tier's host memory in GiB; an auto tier's starting size |
--max-gb | int | workers[].kvOffload.maxGb | an auto tier's cap in GiB (dropped on any other tier) |
--disk-gb | int | workers[].kvOffload.diskGb | a disk tier's cap on the node's disk in GiB (dropped on any other tier) |
--dtype | string | workers[].flags.kv_cache_dtype (llama.cpp: kv_cache_type) | the KV cache's element type: vLLM fp8, fp8_e4m3, fp8_e5m2; SGLang fp8_e4m3, fp8_e5m2; TensorRT-LLM fp8; llama.cpp q8_0, q4_0. 16bit removes the flag |
--events | string | kvEvents | on or off: the engine reports its KV blocks and the leader routes on them (vLLM, SGLang) |
--isolation | string | routing.cacheIsolation | team (the default), key or none: whose requests may share the prefix cache |
--max-context | int | workload.maxContext | the longest request in tokens the KV cache is sized for; 0 = the model's window |
endpoint policy NAME changes the routing policy, as the console's Routing page does. The write is conditional on the policy revision it read. If someone changed the policy in between, the command fails and you run it again. See Routing.
| Flag | Type | Policy field | Meaning |
|---|---|---|---|
--kv-weight | float | routing.kvWeight | how much a worker's KV cache use counts against it when the leader picks one; 0 = the default |
--kv-saturation | int | routing.kvSaturationPct | the KV cache percent at which a worker is passed over while another has room; 0 = the default |
--prefix-affinity | string | routing.prefixAffinity | on or off: keep a key's requests on the worker that holds its prompt prefix |
--prefix-block-weight | float | routing.prefixBlockWeight | what one held KV block of the prompt is worth, in in-flight requests; needs kvEvents; 0 = off |
--prefix-block-tier | string | routing.prefixBlockTier | gpu (unset = this) or cpu-lower: with cpu-lower a block in the worker's CPU tier also counts under the held-block weight, at 0.8 of a block on the card; needs kvEvents and a CPU tier |
--load-refresh | string | routing.loadRefreshMs | how often the leader and every front door pull each worker's load: a duration (500ms, 2s) or milliseconds; 0 = the leader's default, 500 ms; at most 1m; below 100 ms the leader uses 100 ms |
--token-weight | float | routing.tokenWeight | 0–100; 0 = off. Arrives in the release after 0.3.6 |
--prefix-depth | int | routing.prefixDepthKiB | KiB, 0 (= 256) or 4–1024. Arrives in the release after 0.3.6 |
--slow-factor | float | routing.slowFactor | 0 = off, else above 1. Arrives in the release after 0.3.6 |
--sticky-ttl | string | routing.stickyTtlSeconds | how long a session or a prompt prefix stays on the worker that last served it: a duration (15m, 1h) or seconds; 0 = the leader's own start value; at most 24h. Applies live, to pins placed from then on |
opodcp endpoint policy --prefix-affinity on --kv-weight 2 chat
opodcp endpoint policy --prefix-block-weight 1 --prefix-block-tier cpu-lower --sticky-ttl 30m --load-refresh 250ms chatThe command prints the stored policy after the write. With no flag it only prints it. Flags go before the name.
endpoint expose NAME changes how clients reach the endpoint. - removes a name. See Gateways.
| Flag | Type | Plan field | Meaning |
|---|---|---|---|
--door-alias | string | door.alias | the model a client sends to the cell door to reach this endpoint |
--inference-pool | string | exposure.inferencePool | the Gateway API InferencePool the leader joins; - removes it |
--vertex | string | exposure.vertex | on or off: the leader also serves Vertex AI's container routes |
opodcp endpoint kv chat # print only
opodcp endpoint kv --tier cpu --size-gb 4 chat # a 4 GiB CPU tier on every worker
opodcp endpoint kv --worker 0 --tier auto --size-gb 4 --max-gb 32 chat
opodcp endpoint kv --tier disk --size-gb 4 --disk-gb 200 chat # needs a pinned model revision
opodcp endpoint kv --dtype fp8 --events on --isolation key chat
opodcp endpoint kv --tier none --dtype 16bit chat # back to a 16-bit cache in VRAM only
opodcp endpoint policy --prefix-affinity on --kv-weight 2 chat
opodcp endpoint expose --door-alias chat-prod chat
opodcp endpoint expose --inference-pool - --vertex off chatdoor routes
door routes prints the cell door's auto routes: names a client sends as model that fall back down a list of endpoints. -f FILE replaces the whole list with the file's and prints which routes it added, removed and kept. An empty file is refused, and [] removes every route only with --yes. It needs the admin role. The refusals, --yes and the summary arrive in the release after 0.3.6; 0.3.6 writes what the file holds. See Gateways.
| Flag | Type | Default | Meaning |
|---|---|---|---|
-f | string | "" | a YAML or JSON list of {name, endpoints, pick, maxHops}; pick is first (the default) or least-loaded; maxHops 0 = 1 |
--yes | bool | false | allow a list that removes every route ([]) |
opodcp door routes
opodcp door routes -f routes.yaml
opodcp door routes -f empty.yaml --yes # empty.yaml holds [] — removes every route (the release after 0.3.6)# routes.yaml: "auto" tries the big model first, then the small one
- name: auto
endpoints: [chat-big, chat-small]
pick: first
maxHops: 1Keys and tokens
key create | revoke
An endpoint API key (sk-orc-…). See API keys.
| Verb | Flag | Type | Default | Meaning |
|---|---|---|---|---|
create | --endpoint | string | none (required) | endpoint name or id |
create | --expires-in | duration | the control plane's 90 days | expire after this long |
create | --no-expiry | bool | false | a key that never expires; the choice is recorded on the key.created event |
revoke | --endpoint | string | none | endpoint name (or id, through the API) |
revoke | --direct | bool | false | no control plane: append a tombstone to the endpoint's auth Secret with only a kubeconfig |
revoke | --kubeconfig | string | $KUBECONFIG | with --direct: kubeconfig path; empty = in-cluster |
revoke | --namespace | string | opodcp | with --direct: the control plane's namespace |
revoke | --endpoint-id | string | "" | with --direct: which incarnation, when two endpoints of one name have a Secret |
revoke | --secret | string | "" | with --direct: the auth Secret's name in place of --endpoint, for a grant scoped by resourceNames that cannot list |
key create … NAME prints the key once. key revoke … KEY takes the key's id, or its name when exactly one live key carries it — never the key itself. From the release after 0.3.6, a name only revoked keys carry prints already revoked; nothing changed and exits 0, and a key the control plane chose not to expire reads expires never (0.3.6 added (--no-expiry) either way). Through the API, a name is looked up first in 0.3.0 (on 0.2.1 only an id works there).
opodcp key create --endpoint chat --expires-in 720h ci-bot
opodcp key create --endpoint chat --no-expiry batch-runner
opodcp key revoke --endpoint chat ci-bot
opodcp key revoke --direct --endpoint chat --kubeconfig ~/.kube/config k_3f9a…token create | ls | revoke
A machine token: a program's credential for this cell. Minting needs an admin's --token.
| Verb | Flag | Type | Default | Meaning |
|---|---|---|---|---|
create | --scope | string | viewer | one scope per token: viewer (read only), fleet (also tells this cell its fleet licence fact; the fleet control plane's token), tokens:write (also issue and revoke endpoint keys), plans:write (also write plans and start rollouts). Any other word is refused before a request is sent (the release after 0.3.6) |
create | --expires-in | duration | never | expire after this long; a machine token is revoked, not timed out |
ls | --json | bool | false | print JSON; revoked tokens are included. With none, it says so and names token create |
revoke | — | revoke token ID; its next request is refused. A token revoked before says so and changes nothing (the release after 0.3.6) |
opodcp token create --scope fleet fleet-view # for the fleet control plane's fleet.cells entry
opodcp token create --scope plans:write --expires-in 2160h ci-deployer
opodcp token ls --json
opodcp token revoke tok_1a2b3c4d5e6fNodes
| Command | Flag | Type | Default | Meaning |
|---|---|---|---|---|
node label NODE [KEY=VALUE …] | --remove | string, repeatable | none | a label to remove; only opod.io/* labels may be changed, and from the release after 0.3.6 another key is refused before a request is sent |
nodes | — | per node: its leader fence, whether it may hold a front, and the leaders and doors on it. On 0.2.1 it accepts --leaders, which changes nothing; from 0.3.0 that flag is gone. From the release after 0.3.6 it also shows, from GET /api/v1/capacity/ledger, the vendor, the GPUs, the whole cards a dedicated worker could take (FREE CARDS), the room for a shared budget summed over the measured cards (FREE GB, - when none is measured) and whether the placer may use the node (no: <reason>); an empty cell says so | ||
nodes | --json | bool | false | the same rows as JSON: node, vendor, gpus, freeCards, freeGb, placeable, why, fence, mayHoldFront, leaders, doors (the release after 0.3.6) |
opod.io/leaders=avoid keeps leaders and doors off a node; =prefer makes the placement rule pick it first. See Configuration → Where leaders and front doors run.
opodcp node label node-a opod.io/leaders=avoid
opodcp node label node-c opod.io/leaders=prefer opod.io/pool=fronts
opodcp node label --remove opod.io/leaders --remove opod.io/pool node-a
opodcp nodes
opodcp nodes --json | jq '.[] | select(.placeable)' # the release after 0.3.6Alerts and connectors
Both arrive in the release after 0.3.6. On 0.3.6, use the API or the console.
| Command | Flag | Type | Default | Meaning |
|---|---|---|---|---|
alerts ls | --open | bool | false | only the alerts still firing; without it, open and resolved, newest first (GET /api/v1/alerts?state=all, the newest 200) |
alerts ls | --json | bool | false | the alerts as the API returns them, with each one's detail and remedy |
connectors verify PORT | --json | bool | false | the answer as JSON on stdout; the sentences go to stderr |
alerts ls prints one row per alert: id, severity, state (open, open, acked by … or resolved <time>), object, when it fired and its title, then how many are open. With none, it says so. Acknowledge an alert on the console's Overview page or with POST /api/v1/alerts/{id}/ack. See Alerts inside the control plane.
connectors verify PORT runs the live check of the adapter the port runs now, from the control plane's pod, as the Verify button does with no candidate (POST /api/v1/connectors/{port}/verify, an admin's --token). The port is one of state, events, usage, metrics, logs, traces, secrets, kvstore, batchfiles, checkpoints, notifier, registry, identity, fabric, gangs, autoscaler, executor or cloud; another word is refused before a request is sent. A pass prints the adapter, what it found and, for a usage sink with a table, the schema state, and exits 0. An embedded default passes with nothing to verify. An adapter with no live check (a notifier, which a test alert checks instead) says so and exits 0. A failure exits 1 and names its kind (unreachable, refused, missing, invalid), the redacted detail and opodcp runbook PORT. To verify a candidate before you save it, use the console's Connectors page or the API with adapter in the body. See Connectors.
opodcp alerts ls --open
opodcp alerts ls --json | jq '.[] | select(.severity == "critical") | {id, title, remedy}'
opodcp connectors verify usage
# connector usage (postgres) verified: connected to postgres 16.4 as opodcp
# its schema is current (step 3)
opodcp connectors verify events || echo "the events bus failed its check"
opodcp connectors verify state --json | jq .okModels
| Verb | Flag | Type | Default | Meaning |
|---|---|---|---|---|
versions MODEL | --json | bool | false | every version: state, revision, licence, approval, the last signature report |
approve MODEL VERSION | --note | string | "" | why it may run: the review, the eval, the ticket. Needs an admin's token |
unapprove MODEL VERSION | — | clears the approval; endpoints that pin the version keep running it. Spelled revoke up to 0.3.6; it is unapprove from the release after 0.3.6, because revoke elsewhere invalidates a credential | ||
approval [on|off] | — | with no argument, print models.requireApproval; on means a new plan may pin only an approved version (E-MODEL-UNAPPROVED) |
See Models → Approval.
opodcp model versions qwen2.5-7b
opodcp model approve --note 'eval 0.82, licence reviewed' qwen2.5-7b v2
opodcp model revoke qwen2.5-7b v1 # 0.3.6; the release after 0.3.6: opodcp model unapprove qwen2.5-7b v1
opodcp model approval onThe store
| Command | Flag | Type | Default | Meaning |
|---|---|---|---|---|
backup | -o | string | opodcp-backup-<UTC time>.jsonl | the output file; - = stdout |
restore FILE | --wipe | bool | false | empty every table before inserting; without it the store must be empty. Stop serve first. Asks first on a terminal |
restore FILE | --yes | bool | false | with --wipe: do not ask. Needed without a terminal (a script, a Job) |
store move | --to | string | none | the target Postgres DSN (postgres://…). A move that stops part way says the source is unchanged and the target may be partly written — empty it before you retry (the release after 0.3.6) |
store move | --to-file | string | none | a file holding the target DSN, so no password is on the command line; give it or --to |
secrets sync | — | record every token the Kubernetes Secrets hold into the connected secret store (--cp, --token) |
backup, restore and store move open the store named by OPODCP_STATE_DSN. From the release after 0.3.6, restore --wipe names the store it empties, asks [y/N] on a terminal, and without a terminal refuses unless --yes is given; 0.3.6 wipes without asking. store move runs backup, restore and verify; the source is untouched. See Backup and restore.
export OPODCP_STATE_DSN="$(kubectl -n opodcp get secret opod-state-dsn -o jsonpath='{.data.dsn}' | base64 -d)"
opodcp backup -o opodcp-backup.jsonl
opodcp backup -o - | gzip > opodcp-backup.jsonl.gz
opodcp restore opodcp-backup.jsonl # into an empty store
opodcp restore --wipe opodcp-backup.jsonl # empty every table first; asks on a terminal
opodcp restore --wipe --yes opodcp-backup.jsonl # the same in a script or a Job (the release after 0.3.6)
opodcp store move --to-file /run/secrets/postgres-dsn
opodcp secrets sync --cp https://cp.example.comLicence
| Verb | Flag | Type | Default | Meaning |
|---|---|---|---|---|
inspect [token | -] | --cell | string | "" | evaluate the tier for this cell name |
license is an alias. inspect verifies a key against the keys built into this binary and shows the tier it grants — from the release after 0.3.6 as two lines (licence <id> for <org> — N GPUs, plan …, expires … and tier here: <state> — <detail>), with --json for the JSON object 0.3.6 prints; - reads the key from stdin; on a terminal it says to paste the key and press Ctrl-D (the release after 0.3.6). Install a key with the chart or PUT /api/v1/licence; see Licensing.
opodcp licence inspect --cell prod < licence.txtlicence keygen and licence sign are the vendor's side of key issuing. They need the private signing seed, which no install has; a key they sign verifies only against the public keys built into a release. Their flags, for completeness:
| Verb | Flag | Type | Default | Meaning |
|---|---|---|---|---|
keygen | --out | string | licence.key | where to write the private seed (hex, mode 0600); an existing file is refused (the release after 0.3.6) |
keygen | --force | bool | false | replace an existing seed; every licence signed with the old seed stops verifying |
sign | --key | string | licence.key | the production seed file; a different seed signs licences no shipped control plane accepts |
sign | --org | string | none | the customer organisation |
sign | --cell | string | * | the cell the key is bound to; * = any |
sign | --gpus | int | 0 | the GPU ceiling |
sign | --plan | string | team | the plan name |
sign | --years | float | 1 | validity from now |
sign | --grace-days | int | 60 | grace after expiry before the free tier applies to new placements |
sign | --id | string | generated | the key's id |
Used by the chart
You do not run these by hand; the chart's pods do.
node-agent
The telemetry probe's reporter: it runs the vendor probe and the host facts every --every and keeps the newest result. The control plane's telemetry DaemonSets set its environment.
In 0.3.6 it pushes each result to --url. From the release after 0.3.6, every control-plane replica in the cluster reads it instead, with a signed request to POST /v1/report on its port 9147 ($OPOD_MESH_PORT), so each replica sees every node. It pushes only when --url is set, which the control plane does only when it runs outside the cluster.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--vendor | string | $OPOD_VENDOR | nvidia, amd, intel or tt |
--node | string | $OPOD_NODE_NAME | the node name (downward API) |
--url | string | $OPODCP_URL | the control plane's base URL to push to. Required in 0.3.6. From the release after 0.3.6: empty means "answer reads only", and it must be set with --once |
--token-file | string | $OPOD_NODE_TOKEN_FILE | a file holding the node report token; without one, $OPOD_NODE_TOKEN. A file it cannot read is named with the reason (0.3.6 said token missing) |
--every | duration | 20s | the report cadence |
--once | bool | false | report once and exit; a failed report exits 1 (the release after 0.3.6; 0.3.6 exits 0) |
--install | string | "" | copy this binary to the path and exit (the init container) |
opodcp node-agent --vendor nvidia --node node-a --url http://opod.opod.svc:8080 --once
opodcp node-agent --install /shared/opodcpha postgres
The hook for ha.postgres.provide: it applies a CloudNativePG Cluster once the operator answers, then waits for its Secret.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--name | string | none (required) | the Cluster's name; its Secret is <name>-app |
--namespace | string | none (required) | the namespace the control plane runs in; the Secret must be there |
--image | string | none (required) | the Postgres image, pinned by digest |
--instances | int | 3 | Postgres instances: one primary, the rest replicas |
--storage | string | 10Gi | volume size per instance |
--storage-class | string | "" | StorageClass; empty = the cluster's default |
--timeout | duration | 14m | how long to wait for the operator and the Secret |
--kubeconfig | string | $KUBECONFIG | kubeconfig path; empty = in-cluster |
opodcp ha postgres --name opod-pg --namespace opodcp --image ghcr.io/cloudnative-pg/postgresql@sha256:… --instances 3 --storage 20GiLast updated · Source: content/docs/control-plane-reference/cli.mdx · View as Markdown