Command line
KubeGlass takes almost all of its configuration from KUBEGLASS_* environment variables or a kubeglass.yaml file (see Configuration). The command line has only a few flags.
kubeglass
Section titled “kubeglass”Starts the server and opens it in your browser.
kubeglass [--port N] [--no-browser] [--read-only] [--local-shell] [--verbose] [--demo] [--version] [--healthcheck]| Flag | Does |
|---|---|
--port N |
Listen on port N. Same as KUBEGLASS_PORT |
--no-browser |
Don’t open a browser tab. Same as KUBEGLASS_NO_BROWSER=1 |
--verbose |
Print the full server log to the terminal instead of a log file |
--read-only |
Refuse every change, whatever RBAC allows: no edits, deletes, scaling, restarts, shells or port forwarding. Same as KUBEGLASS_READ_ONLY=true |
--local-shell |
Offer a shell on this computer in the terminal panel, set to the cluster you have open. Only in local auth mode, outside a cluster and without --read-only. Same as KUBEGLASS_ENABLE_LOCAL_SHELL=true; see Terminal |
--demo |
Run with built-in sample data. No cluster is needed and nothing is changed. Same as KUBEGLASS_DEMO_MODE=true |
--version |
Print the version, commit and build date, then exit |
--healthcheck |
Call the local server’s /healthz and exit with 0 when it answers. The container image uses this as its health check |
-h, --help |
Show usage |
At a terminal, KubeGlass prints its address and your clusters, then opens the address in your default browser. The full log goes to kubeglass.log in the data directory (~/.kubeglass/data by default); the previous run’s log is kept as kubeglass.log.1. Errors are still printed to the terminal. When the output is not a terminal, as in a container, the log goes to stdout as JSON.
The browser is not opened over SSH, inside a cluster or a CI job, on Linux without a display, or when BROWSER=none.
The default port is 8090. If another program has it, KubeGlass takes the next free port up to 8100 and prints the one it chose. A port you set with --port or KUBEGLASS_PORT is never changed: KubeGlass exits if it is taken. If KubeGlass itself is already running on the port, a second kubeglass opens the running one and exits.
If the kubeconfig has no current-context, or it names a context that doesn’t exist, KubeGlass starts on the first context in alphabetical order. Your kubeconfig is not changed.
If no kubeconfig can be loaded, KubeGlass starts in setup mode instead of exiting: the UI offers to start a local cluster, paste a kubeconfig, or open the demo, and continues as soon as a kubeconfig appears.
kubeglass mcp
Section titled “kubeglass mcp”Runs the MCP server over stdio. KubeGlass itself must already be running.
kubeglass mcp [--url URL] [--token TOKEN]| Flag | Environment | Default | Does |
|---|---|---|---|
--url |
KUBEGLASS_URL |
The KubeGlass running on this machine, or http://localhost:8090 |
The KubeGlass to query |
--token |
KUBEGLASS_TOKEN |
empty | Bearer token, for a KubeGlass that uses OIDC sign-in |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Clean shutdown, or --version, --help and a passing --healthcheck |
1 |
The server or the MCP server failed, --healthcheck got no answer, or kubeglass mcp got an unknown flag |
2 |
kubeglass got an unknown flag or command |