Problem or Use Case
This PR for introduces a new "vcluster prompt" command that outputs a shell prompt segment when the active Kubernetes context belongs to a vind cluster.
Example output:
(vind:demo)
The command outputs an empty string when the current context is not managed by vind.
Motivation
Users working with multiple Kubernetes clusters often rely on prompt indicators to avoid running commands against the wrong cluster. Python virtual environments, kube-ps1, and similar tools provide clear visual feedback about the current execution environment.
Today, vind users do not have an official way to display the active vind cluster in their terminal prompt.
Proposed Solution
Add a lightweight "vcluster prompt" command that:
- Detects the current Kubernetes context.
- Determines whether the context belongs to a vind cluster.
- Outputs a prompt segment such as "(vind:demo)".
This command can be integrated with Bash, Zsh, Fish, Starship, and other shell prompt frameworks without requiring the CLI to modify the user's shell environment.
Benefits
- Clear visual indication of active vind context.
- Prevents accidental operations against the wrong cluster.
- Works across all major shells.
- Avoids shell-specific hacks.
- Follows established Kubernetes ecosystem patterns.
Example
PS1='$(vcluster prompt) '$PS1
Result:
(vind:demo) user@laptop:~$
Alternatives Considered
No response
Area
Other
Additional Context
No response
Problem or Use Case
This PR for introduces a new "vcluster prompt" command that outputs a shell prompt segment when the active Kubernetes context belongs to a vind cluster.
Example output:
(vind:demo)
The command outputs an empty string when the current context is not managed by vind.
Motivation
Users working with multiple Kubernetes clusters often rely on prompt indicators to avoid running commands against the wrong cluster. Python virtual environments, kube-ps1, and similar tools provide clear visual feedback about the current execution environment.
Today, vind users do not have an official way to display the active vind cluster in their terminal prompt.
Proposed Solution
Add a lightweight "vcluster prompt" command that:
This command can be integrated with Bash, Zsh, Fish, Starship, and other shell prompt frameworks without requiring the CLI to modify the user's shell environment.
Benefits
Example
PS1='$(vcluster prompt) '$PS1
Result:
(vind:demo) user@laptop:~$
Alternatives Considered
No response
Area
Other
Additional Context
No response