CLI
The kubrain CLI hits the same HTTP API as the MCP tools, with the
same auth — use it for scripting and CI. Commands are grouped; the MCP tool
create_cluster is kubrain cluster create, deploy is kubrain deploy ship,
and so on.
kubrain [global options] <command> [subcommand] [options]
Global options:
--api <url> api-server base URL (default https://api.kubrain.dev; or ~/.kubrain/config) [$KUBRAIN_API]
--token <token> tenant bearer token (default ~/.kubrain/config; set via `kubrain auth login`) [$KUBRAIN_TOKEN]Top-level commands
| Command | What it does |
|---|---|
auth | Sign up / sign in; manage credentials in ~/.kubrain/config. |
vpc | Manage VPCs (isolated networks). |
cluster | Manage Kubernetes clusters. |
addon | Install curated add-ons into clusters. |
deploy | App deployments — a named handle on a cluster you ship code to. |
zone | Host DNS zones for your domains (free). |
registry | Show the hosted container registry push coordinates. |
bucket | S3-compatible object storage. |
export / plan / apply | Declarative blueprint workflow. |
versions | Kubernetes versions you can create/upgrade to. |
regions | Regions and zones with coarse free capacity. |
quota | Your limits and usage with the €/month view. |
usage | Month-to-date consumption (GiB-hours + €) per resource, including deleted ones; --month YYYY-MM for a past month. |
pricing | The rate card — no token needed. |
estimate | Price a cluster or a blueprint file — no token needed. |
mcp | Run the MCP server (stdio) for Claude / agents. |
admin | Administer tenants (requires an admin token). |
kubrain cluster
| Subcommand | What it does |
|---|---|
create | Plan/create a cluster in a VPC. |
list | List your clusters. |
status | Show a cluster’s status. |
scale | Change the worker count (normal/ha). |
resize | Change worker RAM; CAPI rolls the worker pool. |
upgrade | Upgrade the Kubernetes version (CP first, then workers). |
reapply | Re-apply the manifest unchanged to pick up new platform features. |
kubeconfig | Print a kubeconfig, or write it to --output. |
delete | Delete a cluster (cascades to its VMs). |
kubrain deploy
The busiest group — build, ship, observe, and secure an app.
| Subcommand | What it does |
|---|---|
create | Create a deployment handle on a cluster (idempotent); --repo auto-builds on push. |
list / get | Inventory / show one deployment. |
ship | Build the local source in the cloud and roll it out (or --image for prebuilt). |
rollback | Re-point to a prior release (default: last good). |
promote | Ship one deployment’s tested image on another — no rebuild. |
set-trigger | Auto-build policy: manual | commit:<glob> | tag:<glob> | schedule:<cron>. |
deploy-key | Print the read-only Git deploy key to add to your repo. |
logs | Tail recent pod logs live from the cluster (nothing stored). |
metrics | Golden signals (req rate, 5xx rate, p95) — no instrumentation. |
alert | Arm alerts on a deployment (evaluated server-side; webhook/email). |
set-secret / unset-secret | Set/remove a secret (value from --value-file or --from-env). |
detect / scaffold / validate / render | Local: inspect stack, write starter manifest, lint, render manifests to stdout. |
delete | Tear down a deployment. |
kubrain zone
| Subcommand | What it does |
|---|---|
create | Host a domain (idempotent, free); prints the NS set to delegate. |
list / get | List zones / show a zone with its records and NS set. |
set / unset | Create-or-replace / delete a record set (repeat values for round-robin). |
records | List a zone’s records. |
delete | Stop hosting a domain (removes all records). |
kubrain bucket
| Subcommand | What it does |
|---|---|
create | Create a bucket (the first one also provisions your S3 user). |
list / get | Inventory / show a bucket with live stats. |
credentials | Print your S3 endpoint + key pair, or write to --output. |
delete | Delete an empty bucket (non-empty is refused). |
kubrain addon
| Subcommand | What it does |
|---|---|
list | Installable add-ons with versions and cost — no token needed. |
install | Install an add-on into a running cluster (idempotent). |
uninstall | Remove an add-on (ingress-nginx also releases its LB IP). |
Blueprints
kubrain export > tenant.yaml # snapshot live resources as a blueprint
kubrain plan --file tenant.yaml # diff spec vs. live (read-only)
kubrain apply --file tenant.yaml # converge (add --prune to delete orphans)
kubrain estimate --file tenant.yaml # price the whole documentSee the MCP tools reference for return shapes; the two surfaces are the same engine.