Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set --kubeconfig flag as optional in k3kcli cluster <cmd> #153

Open
enrichman opened this issue Nov 29, 2024 · 0 comments
Open

Set --kubeconfig flag as optional in k3kcli cluster <cmd> #153

enrichman opened this issue Nov 29, 2024 · 0 comments
Labels
cli good first issue Good for newcomers

Comments

@enrichman
Copy link
Collaborator

The k3kcli cluster commands need the --kubeconfig flag.

This should not be mandatory, and it should follow the same logic of kubectl (see doc):

  • If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place.

  • If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rules for your system). These paths are merged. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list.

  • Otherwise, ${HOME}/.kube/config is used and no merging takes place.

It should work by default, but if not I think we can avoid the merging of multiple files, if complicated, and just add the fallback to the default location ${HOME}/.kube/config.

@enrichman enrichman added good first issue Good for newcomers cli labels Nov 29, 2024
@enrichman enrichman changed the title Set --kubeconfig flag as optional in k3kcli cluster <cmd> commands Set --kubeconfig flag as optional in k3kcli cluster <cmd> Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant