Usage
Arguments
Name of the context to switch to. If not provided, you’ll be shown a list to choose from.
Examples
Switch to a specific context
Choose from a list
If you don’t specify a context name:How It Works
Changing the context updates~/.config/uncloud/config.yaml to set the current context. All subsequent commands will interact with the selected cluster.
Current Context
Check which context is currently active:Override Context
You can override the current context for a single command using the--context flag:
Use Cases
Switch Between Environments
Develop on staging, deploy to production:Manage Multiple Clusters
Switch between different customer clusters:Avoid Mistakes
Always verify which context you’re using before running destructive commands:Related Commands
uc context ls- List available contextsuc machine init- Initialize a new cluster (creates a new context)
