CLI reference
The nebula command, its subcommands and flags, including the commands that validate nebula.toml and template files before you push them.
The nebula binary is the control plane. It also carries the commands that operate it and two that check files before you push them: nebula config validate and nebula template validate. This page is generated from the command tree of the release it describes.
Where to run it
The binary is /usr/local/bin/nebula in the control plane image. When the installer sets up the host updater, which is the default, it also copies the binary to bin/nebula in the install directory (/opt/nebula/bin/nebula by default). The commands that read files, nebula config validate and nebula template validate, need no database and no running control plane.
Settings
Every flag of every command is also a setting. Set it three ways:
- the flag, such as
--base-url; - an environment variable named
NEBULA_plus the flag name in capitals with underscores, such asNEBULA_BASE_URL; - a key of the same name as the flag in a
nebula.yamlfile, read from the working directory, from/etc/nebula, or from the path in--config.
A flag wins over the environment variable, and the environment variable wins over the file. The configuration reference groups the nebula serve settings by what they do.
Exit codes
| Code | Meaning |
|---|---|
0 | The command succeeded. |
1 | The command ran and failed, or a validation command found a problem. |
2 | The command line was wrong: an unknown flag or log level, an argument the command does not take, or a required setting that is missing. |
Global flags
Every command accepts these.
| Flag | Type | Default | Description |
|---|---|---|---|
--config | string | none | path to a nebula.yaml configuration file; optional |
--log-level | string | info | log level: debug, info, warn or error |
nebula
NebulaCtrl is a Kubernetes-native deployment control plane.
The control plane holds projects, environments, services and releases; an agent inside each cluster pulls desired state and reports what it observes.
nebula COMMANDCommands:
nebula changelog: Print this build's own release feed as JSONnebula config: Work with nebula.toml repository configuration filesnebula migrate: Apply or inspect database migrationsnebula openapi: Print the OpenAPI description to stdoutnebula secrets: Maintain credentials sealed in the databasenebula serve: Run the API, the user interface and the cluster agent linknebula template: Work with app template filesnebula updater: Run the host service that performs console-requested control plane updatesnebula version: Print the build version
nebula changelog
Print this build's own release feed as JSON.
The same builder GET /api/v1/releases uses turns the embedded CHANGELOG.md into this output, so the two can never list different releases.
nebula changelognebula config
Work with nebula.toml repository configuration files.
nebula config COMMANDCommands:
nebula config validate: Parse a nebula.toml file (a service's or a project's) and report every problem
nebula config validate
Parse a nebula.toml file (a service's or a project's) and report every problem.
Reads FILE, or ./nebula.toml, and reports every problem in it, not only the first. A file with a top-level [services] or [databases] table is checked as a project config. Any other file is checked as a service's nebula.toml, once for each [environments.<name>] table it declares and for production, development and preview.
A problem prints as FILE:LINE: PATH: MESSAGE. A file with none prints FILE: ok and a summary of what it describes. The command exits 1 if it found a problem.
The check needs no database and no control plane, so it sees the file alone. What depends on the project, such as whether a referenced service exists, is checked by the control plane.
nebula config validate [FILE]nebula config validate
nebula config validate services/api/nebula.tomlnebula migrate
Apply or inspect database migrations.
nebula serve applies pending migrations at boot, so these commands exist for an operator who wants the schema moved without starting the server.
nebula migrate COMMANDCommands:
nebula migrate status: Show every migration and whether it has been appliednebula migrate up: Apply every pending migration
Flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--database-url | string | none | PostgreSQL connection URL |
nebula migrate status
Show every migration and whether it has been applied.
nebula migrate statusAlso takes --database-url from its parent command.
nebula migrate up
Apply every pending migration.
nebula migrate upAlso takes --database-url from its parent command.
nebula openapi
Print the OpenAPI description to stdout.
The document is built from the same route table the server serves, so the generated TypeScript client cannot describe an API this binary does not have. It needs no database and binds no port.
nebula openapi [flags]Flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--indent | bool | none | indent the JSON, so a committed copy reads as a diff when the API changes |
--server-url | string | none | add this URL to the document as its server, for generated example requests |
nebula secrets
Maintain credentials sealed in the database.
nebula secrets COMMANDCommands:
nebula secrets reseal: Re-encrypt every stored credential under the current master key
Flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--database-url | string | none | PostgreSQL connection URL |
--master-key | string | none | new current master key, base64 of exactly 32 bytes |
--previous-master-keys | list | none | comma-separated previous base64 master keys accepted while resealing |
nebula secrets reseal
Re-encrypt every stored credential under the current master key.
Re-encrypts every credential the database holds under the current master key (--master-key). Run it after rotating the master key, with the key you are retiring in --previous-master-keys so the old ciphertext can still be read.
It prints the current key id and how many rows it resealed in each table. Once it has finished, drop the previous keys from the configuration. It needs --database-url and --master-key.
nebula secrets resealAlso takes --database-url, --master-key, --previous-master-keys from its parent command.
nebula serve
Run the API, the user interface and the cluster agent link.
nebula serve [flags]Flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--acme-directory-url | string | https://acme-v02.api.letsencrypt.org/directory | ACME directory the control plane issues DNS-01 certificates from; point it at Let's Encrypt staging when testing |
--acme-dns-resolvers | list | none | recursive DNS servers (host:port) used to find a hostname's zone and check DNS-01 propagation; defaults to the system resolver. Set it for split-horizon DNS or a private test CA |
--agent-image | string | none | container image the cluster install manifest deploys; defaults to ghcr.io/nebulactrl/nebula-agent at this binary's version |
--agent-update-deadline | duration | 10m0s | how long a running agent update may go without the new agent reporting in before it is automatically rolled back |
--base-url | string | none | public URL this installation is reached at, for example https://nebula.example.com |
--cloudflare-api-base | string | https://api.cloudflare.com/client/v4 | Cloudflare API base URL; override for an end-to-end test fake |
--community-templates | bool | true | read the public community template repository; false turns it off entirely, for an air-gapped install |
--community-templates-repo | string | nebulactrl/nebula-templates | the community template repository, as owner/name; every instance reads its main branch |
--database-url | string | none | PostgreSQL connection URL |
--github-api-base | string | https://api.github.com | GitHub API base URL; override for GitHub Enterprise Server or an end-to-end test fake |
--github-web-base | string | https://github.com | GitHub web base URL used for the App manifest flow; override for GitHub Enterprise Server or an end-to-end test fake |
--k3s-channels-url | string | https://update.k3s.io/v1-release/channels | K3s public release-channel feed a cluster's available patch/minor upgrades are computed against; override for an end-to-end test fake |
--k3s-version | string | v1.36.4+k3s1 | K3s version the install script pins with INSTALL_K3S_VERSION, for example v1.36.4+k3s1 |
--listen | string | :8080 | address the API and the user interface listen on |
--master-key | string | none | base64 of exactly 32 bytes; every stored secret is sealed under it |
--metrics-listen | string | 127.0.0.1:9090 | address Prometheus metrics listen on |
--oidc-acr-values | string | none | optional acr_values sent on every sign-in, for a provider that only reports a second factor when asked for a stronger context, for example urn:okta:loa:2fa:any |
--oidc-client-id | string | none | OIDC client id registered with the issuer |
--oidc-client-secret | string | none | OIDC client secret registered with the issuer |
--oidc-insecure-http | bool | none | allow a plain http issuer; development and end-to-end tests only |
--oidc-issuer | string | none | OIDC issuer URL; this installation delegates all authentication to it |
--oidc-provider-name | string | your identity provider | name shown on the sign-in button |
--oidc-scopes | string | openid profile email | space-separated OIDC scopes to request |
--pagerduty-events-url | string | https://events.pagerduty.com | PagerDuty Events API origin notification channels deliver to; override for an end-to-end test fake |
--pprof | bool | none | expose /debug/pprof on the metrics listener |
--previous-master-keys | list | none | older base64 32-byte master keys, comma-separated; retain them only until nebula secrets reseal has re-encrypted every stored secret |
--release-feed-url | string | https://get.nebulactrl.dev/changelog.json | release feed checked for a newer release, in the shape GET /api/v1/releases serves, for example a mirror. Requests carry no instance id or version, only a plain "NebulaCtrl" User-Agent |
--simulated-cluster | bool | none | run an in-process simulated cluster instead of waiting for a real one |
--simulated-cluster-expandable-storage | bool | none | give the simulated cluster an expandable default storage class (longhorn) next to local-path, which cannot expand |
--trusted-proxies | list | none | proxy IP addresses or CIDRs allowed to supply client IP headers; use cloudflare for its reviewed edge ranges, and include the exact local reverse-proxy or Docker bridge CIDR |
--update-check | bool | true | check the release feed for a newer NebulaCtrl release; false turns update checks off entirely, for an air-gapped install |
--updater-token | string | none | secret the host updater presents when it polls the control plane; the installer generates it as NEBULA_UPDATER_TOKEN in .env. Empty turns console updates of the control plane off |
nebula template
Work with app template files.
nebula template COMMANDCommands:
nebula template validate: Parse one or more template files and report every problem
nebula template validate
Parse one or more template files and report every problem.
Parses each FILE as an app template and reports every problem in it. The file name, minus .yaml or .yml, must equal the template's slug.
A file with no problem prints FILE: ok and the template's name and service count. The command exits 1 if any file has a problem. It needs no database and no control plane.
nebula template validate FILE...nebula template validate templates/redis-cache.yamlnebula updater
Run the host service that performs console-requested control plane updates.
The updater runs on the control plane's host, not in its container. Every interval it polls the control plane over the host's loopback listener with the token in <dir>/.env (NEBULA_UPDATER_TOKEN). When an owner asked for an update it runs that version's install.sh from the get site, the command an operator would run by hand, verifies the new version, reinstalls the previous one if that fails, and reports the outcome. install.sh installs it as the nebula-updater systemd service.
nebula updater [flags]Flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--control-plane-url | string | none | control plane base URL; default http://<NEBULA_HOST_LISTEN from <dir>/.env> |
--dir | string | none | install directory holding .env, bin and updater; required |
--get-url | string | https://get.nebulactrl.dev | release site serving versions.json and each version's install.sh |
--interval | duration | 15s | how often to poll the control plane, which is also its heartbeat |
nebula version
Print the build version.
Prints the version, the Go version and the operating system and architecture the binary was built for.
nebula versionAgent
The endpoints a cluster's agent and the install scripts call. They authenticate with agent and enrollment tokens, not with API tokens. Each operation lists its method and path, parameters, request body, responses and an example call.
Self-hosting
Run the NebulaCtrl control plane on your own Linux host, and see which parts you operate and which parts NebulaCtrl installs and runs on your clusters.