opencenter cluster env
Export cluster environment variables
Synopsis
Export environment variables for the specified cluster or current active cluster.
This command generates shell commands to set up the cluster environment including:
-
Cloud provider credentials (AWS, OpenStack)
-
KUBECONFIG path
-
ANSIBLE_INVENTORY path
-
Cluster-specific binary paths
-
Virtual environment activation
If no cluster name is provided, uses the current active cluster.
The output is designed to be evaluated by your shell: eval "$(opencenter cluster env)" eval "$(opencenter cluster env my-cluster)"
This is useful for:
-
Re-exporting environment variables after they’ve changed
-
Setting up environment in a new terminal session
-
Refreshing credentials that may have been updated
opencenter cluster env [cluster-name] [flags]
Examples
# Export current cluster environment
eval "$(opencenter cluster env)"
# Export specific cluster environment
eval "$(opencenter cluster env prod-cluster)"
# Export with organization
eval "$(opencenter cluster env myorg/prod-cluster)"
# Override shell detection
opencenter cluster env --shell fish | source