-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
None
-
None
-
None
-
None
-
None
As a user of the hypershift/hcp CLI, I want to specify a --kubeconfig flag when running create/destroy commands, so that I can easily manage multiple management clusters from a central location without modifying my default kubeconfig.
Acceptance Criteria
- Test that hypershift create cluster accepts a --kubeconfig flag pointing to a management cluster kubeconfig
- Test that hypershift destroy cluster accepts a --kubeconfig flag pointing to a management cluster kubeconfig
- Test that hcp create cluster accepts a --kubeconfig flag pointing to a management cluster kubeconfig
- Test that hcp destroy cluster accepts a --kubeconfig flag pointing to a management cluster kubeconfig
- Verify that when --kubeconfig is provided, the CLI uses that kubeconfig instead of the default ~/.kube/config
- Verify that when --kubeconfig is not provided, the CLI falls back to the default kubeconfig behavior
- Verify that an appropriate error message is shown if the specified kubeconfig file does not exist
Additional Context
This enhancement improves the CLI usability for users managing multiple HyperShift management clusters. Currently, users must switch their default kubeconfig context or set the KUBECONFIG environment variable before running commands. Adding an explicit --kubeconfig flag provides a more direct and scriptable approach.
Use Cases
- SREs managing multiple management clusters from a bastion host
- Automation scripts that need to target specific management clusters
- CI/CD pipelines creating/destroying hosted clusters across different management clusters
Out of Scope
- Adding --kubeconfig to other subcommands (can be done in follow-up stories)