Gubernator (gbnt) CLI Reference
This document serves as the complete reference for the Gubernator CLI tool (gbnt). All commands listed here are fully implemented and functional.
Gubernator's CLI is heavily inspired by Docker Swarm and Nomad, providing an intuitive interface for managing clusters, nodes, stacks, and individual services.
🏛 The Legion (Cluster Management)
Commands for managing the cluster lifecycle and joining nodes.
-
gbnt legion initInitializes a new Gubernator cluster, converting the current node into the local Manager and setting up the SQLite database state. -
gbnt legion join --token [token] --manager [ip:4000]Joins the current machine to an existing Gubernator cluster as a Worker node. -
gbnt legion join-tokenPrints the exact command and secure token needed to join new Worker nodes to the cluster. -
gbnt legion leaveGracefully leaves the cluster, marking the current node asleftin the Manager's database.
🛡 The Centurions (Node Management)
Commands executed by the Manager to inspect and control the physical worker machines.
-
gbnt node lsLists all registered nodes in the cluster, displaying their ID, IP, Role, and current Status (e.g., active, down). -
gbnt node inspect [node_id]Displays detailed JSON information about a specific node, including its assigned labels and metadata. -
gbnt node promote [node_id]Promotes a Worker node to a Manager node within the cluster hierarchy. -
gbnt node demote [node_id]Demotes a Manager node back to a standard Worker role. -
gbnt node update --availability [active|pause|drain|maintenance] [node_id]Changes the scheduling state of a node (e.g., set tomaintenanceordrainto gracefully evacuate running tasks and prevent new tasks from being assigned). -
gbnt node reboot [node_id]Drains running tasks off the specified node, sets its status tomaintenance, and initiates a host system reboot. When the machine powers back up, the worker agent automatically restores the node toactivestatus.
📦 The Command (Stack Management)
Commands for deploying and managing complex multi-container applications via Docker Compose syntax.
-
gbnt stack deploy -c [docker-compose.yml] [stack_name]El parámetro[stack_name]es opcional si el fichero incluye una propiedadname:en la raíz, o una constraintstack.name == <nombre>. Deploys or updates an entire stack of services based on a Compose file. Supports parsingdeploy.placement.constraintsfor targeted scheduling. -
gbnt stack lsLists all currently deployed stacks across the cluster. -
gbnt stack services [stack_id]Lists all the individual services that belong to a specific deployed stack. -
gbnt stack rm [stack_id]Removes a stack completely, cascading the deletion to stop and remove all associated services and tasks.
⚔️ The Cohorts (Service Management)
Commands for managing individual services (which are usually created via Stacks).
-
gbnt service lsLists all active services running across the cluster, along with their desired replica counts and image names. -
gbnt service ps [service_id]Lists the actual physical containers (Tasks) running for a specific service. It displays exactly which Node is running each task and its internal Container IP. -
gbnt service scale [service_id]=[replicas]Updates the desired replica count for a specific service. -
gbnt service rm [service_id]Deletes a specific service and forces the worker nodes to stop its associated containers.
🔧 System Commands
-
gbnt serveStarts the Gubernator Manager daemon. Boots up the REST API (:4000), Flutter Web Dashboard (:4001), and Telemetry server (:4002). -
gbnt healthChecks the health of the local Gubernator process by queryinghttp://localhost:4002/health. Returns exit code0if healthy,1otherwise. Used as the native DockerHEALTHCHECKcommand.
🛡️ SRE Monitor (Observability Stack)
Commands for deploying and managing a production-grade SRE monitoring stack.
-
gbnt monitor initDeploys the full observability stack on the Manager: cAdvisor (:8081), Node Exporter (:9100), Prometheus (:9090), Grafana (:3000), Loki (:3100), Promtail, and Jaeger (OTLP:4317/:4318, UI:16686). Config files are generated in~/.gbnt/monitor/. -
gbnt monitor statusShows the running status, IP address, and exposed ports of each monitoring container. -
gbnt monitor stopStops and removes all monitoring containers and thegbnt-monitor-netDocker network.
🔒 Security & ENS Compliance (RD 311/2022)
Commands for security governance, automated compliance auditing against the Spanish National Security Framework (ENS), software supply-chain security, and cryptographic signing.
-
gbnt security ensExecutes an automated technical compliance evaluation across 11 controls of Annex II RD 311/2022 and prints an ANSI-formatted status scorecard for BÁSICO, MEDIO, and ALTO tiers. -
gbnt security ens --reportGenerates and exports the complete technical compliance evidence report in CommonMark Markdown format ready for official CCN-STIC auditor submissions. -
gbnt security siem statusDisplays live SIEM delivery metrics, transmission success/failure counters, intrusion detection statistics, and ENSop.mon.2compliance status. -
gbnt security siem test [--host H] [--port P] [--proto UDP|TCP|TLS] [--format RFC5424|CEF|JSON]Dispatches a diagnostic test probe to verify SIEM ingestion and measures exact network roundtrip latency in milliseconds. -
gbnt security siem enable --host <IP> [--port <port>] [--proto <proto>] [--format <format>]Enables real-time SIEM event forwarding and elevates the ENS measureop.mon.2to 100% COMPLIANT. -
gbnt security siem disableDisables real-time SIEM event forwarding. -
gbnt scan [image]Scans container images for CVE vulnerabilities and displays CVSS severity metrics. -
gbnt sbom [image]Generates Software Bill of Materials in CycloneDX JSON or SPDX JSON. -
gbnt image sign [image] --key [key_file]Cryptographically signs a container image digest using ECDSA P-256 (Cosign compatible). -
gbnt security policy [audit|enforce]Configures the Gatekeeper admission controller mode for verifying image signatures before container scheduling.
💾 Persistent Storage & Encrypted Backups
Commands for managing multi-node storage pools, Docker volumes, and encrypted backups.
-
gbnt volume lsLists all discovered volumes across Centurion nodes with their physical host residency, mountpoints, and disk usage. -
gbnt backup create [volume_or_stack] [--name NAME] [--encrypt] [--password PASS] [--pause]Creates a point-in-time compressed backup. When--encryptis passed, encrypts the payload using AES-256-GCM authenticated streaming with PBKDF2 key derivation (ENSmp.si.2). -
gbnt backup lsDisplays catalog of all backups, sizes, SHA-256 digests, and encryption status (🔒 AES-256orPlain). -
gbnt backup restore [backup_id] --target [path] [--password PASS]Restores a backup into the target directory. If the archive is encrypted, validates the password and checks AEAD block integrity before decompressing. -
gbnt backup schedule lsLists automated recurring backup cron policies and retention rotations with encryption status. -
gbnt backup schedule add --name <name> --cron <cron> [--type stack|volume|path] [--target <t>] [--dest <d>] [--retention <n>] [--encrypt] [--password <p>] [--pause]Registers an automated periodic backup schedule. Supports--encryptwith--passwordfor AES-256-GCM encryption in repose (ENSop.exp.10/mp.si.2). -
gbnt backup schedule rm <schedule_id>Deletes an automated backup schedule and stops its periodic execution.
🛡️ Security, Gatekeeper & ENS Compliance Subsystem
Complete CLI suite for software supply chain security, admission control, SIEM forwarding, and Esquema Nacional de Seguridad (ENS RD 311/2022) compliance auditing.
Admission Policies & Gatekeeper (mp.sw.2)
-
gbnt security policyDisplays current cluster admission security policy (enforce signatures, block CVE severity, allow unfixed CVEs, trusted registries). -
gbnt security policy set [--signatures enforce|audit|disabled] [--block-cve critical|high|none] [--allow-unfixed] [--registries <list>]Configures admission gatekeeper policy. Modeenforceblocks unsigned images or images with critical/high CVEs.
Cryptographic Keys Management (Cosign ECDSA P-256)
-
gbnt security key lsLists trusted public signing keys configured in the cluster. -
gbnt security key generate [--name <name>] [--default]Generates a new ECDSA P-256 keypair in the cluster and prints its public key PEM. -
gbnt security key rm <key_id>Removes a trusted signing key from the cluster.
Image Signing, Verification & SBOM
-
gbnt image sign <image> [--key <key.pem>] [--signer <name>]Cryptographically signs a container image digest using an in-cluster or external ECDSA key. -
gbnt image verify <image>Verifies the cryptographic signature of an image against trusted keys and policy. -
gbnt image unsign <image>Revokes/removes the cryptographic signature from an image. -
gbnt sbom <image> [--format cyclonedx-json|spdx-json]Generates a Software Bill of Materials in CycloneDX or SPDX format. -
gbnt scan <image>Triggers vulnerability scanning and CVE inspection for a container image.
ENS Compliance Audit & SIEM
-
gbnt security ens [--report] [--format table|json|markdown]Audits the cluster against the 11 technical measures of ENS RD 311/2022 (BÁSICO, MEDIO, ALTO). Pass--reportfor full Markdown export. -
gbnt security siem statusDisplays real-time SIEM event forwarding metrics, intrusion alerts, and collector link state. -
gbnt security siem test [--host <h>] [--port <p>] [--proto UDP|TCP|TLS] [--format RFC5424|CEF|JSON]Dispatches an active probe to the SIEM receiver and measures roundtrip network latency in milliseconds. -
gbnt security siem enable --host <h> [--port <p>] [--proto UDP|TCP|TLS] [--format RFC5424|CEF|JSON]Activates real-time SIEM forwarding, elevating measureop.mon.2to 100% COMPLIANT. -
gbnt security siem disableDisables real-time SIEM forwarding.