Files
uncloud/website/docs/9-cli-reference/uc_ctx.md
T
Miek GiebenandGitHub 6409a47c71 feat: add uc ctx show command to print the current cluster context (#317)
* feat: add uc ctx show

This only shows the current context and nothing more. On error nothing
is printed (also no error). This is useful to include in your prompt.

See: #314

Signed-off-by: Miek Gieben <miek@miek.nl>

* docs

Signed-off-by: Miek Gieben <miek@miek.nl>

---------

Signed-off-by: Miek Gieben <miek@miek.nl>
2026-04-21 18:22:02 +10:00

1.1 KiB

uc ctx

Switch between different cluster contexts. Contains subcommands to manage contexts.

uc ctx [flags]

Options

  -h, --help   help for ctx

Options inherited from parent commands

      --connect string          Connect to a remote cluster machine without using the Uncloud configuration file. [$UNCLOUD_CONNECT]
                                Format: [ssh://]user@host[:port], ssh+go://user@host[:port], tcp://host:port, or unix:///path/to/uncloud.sock
  -c, --context string          Name of the cluster context to use (default is the current context). [$UNCLOUD_CONTEXT]
      --uncloud-config string   Path to the Uncloud configuration file. [$UNCLOUD_CONFIG] (default "~/.config/uncloud/config.yaml")

See also

  • uc - A CLI tool for managing Uncloud resources such as machines, services, and volumes.
  • uc ctx connection - Choose a new default connection for the current context.
  • uc ctx ls - List available cluster contexts.
  • uc ctx show - Show current cluster context.
  • uc ctx use - Switch to a different cluster context.