Edit

opencenter cluster use

Set the active cluster

Synopsis

Set the active cluster and display comprehensive information including:

  • Cluster metadata (name, environment, region, status, organization)

  • GitOps repository paths and structure

  • Cluster-specific paths (SOPS keys, configuration files)

  • Environment setup commands for shell configuration

By default, the active cluster is session-scoped (current terminal only) when shell integration is enabled via: eval "$(opencenter shell-init)"

Use --persistent to set a global active cluster that affects all terminals.

If no cluster name is provided, an interactive selection menu is displayed. For deployed clusters, environment setup commands are generated to configure KUBECONFIG, ANSIBLE_INVENTORY, virtual environment, and PATH variables.

Use --clear to deactivate the current session cluster. Use --clear-persistent to remove the persistent active cluster.

opencenter cluster use [name] [flags]

Options

      --clear              Clear the active cluster (deactivate session)
      --clear-persistent   Clear the persistent active cluster
  -h, --help               help for use
      --persistent         Set persistent active cluster (affects all terminals)
      --shell string       Override shell detection (bash, zsh, fish, powershell)

SEE ALSO

  • opencenter_cluster.md[opencenter cluster] - Manage cluster configurations

Auto generated by spf13/cobra on 28-Apr-2026