CLI
mgx-cli ships in the node image and is on PATH on every node, control plane
and data plane alike. Nodes are equivalent: they are members of one cluster, so
whichever one you land on can drive the whole thing — there is no designated
admin host to find first.
It talks to the same HTTP/S JSON RPC API the CSI driver uses, so anything the driver can do you can do by hand, and vice versa.
Start a session
mgx-cli
It defaults to 127.0.0.1:8082 — the API on the node you are logged into. Log
in to pick up the command set:
mgx-core:127.0.0.1:nologin> login admin --cluster main --ns main Password: logged.. mgx-core:127.0.0.1:main:main:admin>
The password is MGX_GW_ADMIN_PASSWD from the node secrets — see
Install the storage cluster.
Flags
| Flag | Default | |
|---|---|---|
--host | 127.0.0.1 | API host. Point it at another node to drive that one. |
--port | 8082 | API port. |
--tls / --tls_verify | n | TLS, and whether to verify the certificate. |
--timeout | 30 | Request timeout, seconds. |
--verbose | n | Log the HTTP exchange — useful when an operation fails. |
--homedir | ~/.mgx | Session state and history. |
Commands
login, logout, resource, help and quit are always there. Everything
else is discovered from the API when you log in, one group per plugin core
spawned — so the command set is the cluster's own surface rather than a version
baked into the binary, and a control-plane node offers a different set from a
data-plane node.
mgx-core:127.0.0.1:main:main:admin> help mgx-core:127.0.0.1:main:main:admin> help cluster
| Group | What it drives |
|---|---|
cluster | Membership and lifecycle: nodes, free nodes, plugins and the plugin repo, the VIP, versions, metrics |
storage | Volumes and volume configs — create, start, stop, resize, clean, delete |
cache | Cache pools, pool configs, node mounts |
snapshot | Snapshot configs, snapshots and restores |
mgmt | The downstream pool registry a management plane keeps, and its request log |
scheduler | Placement configs, and draining or uncordoning a node |
help <group> lists what a group has, and -h on any command prints its
flags:
mgx-core:127.0.0.1:main:main:admin> storage volume add -h